GIMR Database Changes in Oracle Cluster
GIMR, or Grid Infrastructure Management Repository, was introduced in Oracle 12c. Oracle’s purpose in creating GIMR was to record cluster-related events and incidents. More precisely, GIMR is intended to store Cluster Health Monitor data inside its database.
This database contains around 20 tables, which can be listed using the following commands:
[grid@RAC1 ~]$ export ORACLE_SID=-MGMTDB
[grid@RAC1 ~]$ sqlplus "/as sysdba"
SQL> alter session set container=GIMR_DSCREP_10;
Session altered.
SQL> select table_name from dba_tables where owner='CHM' order by table_name;
TABLE_NAME
--------------------------------------------------------------------------------
CATCHMUTILPLS_PARTITION_TMP_TBL
CHMOS_ACTIVE_CONFIG_INT_TBL
CHMOS_ADVM_INT_TBL
…
16 rows selected.For example, using the CHMOS_SYSTEM_SAMPLE_INT_TBL table, you can obtain information about disk I/O:
select to_char(begintime, 'YYYY/MM/DD HH24:mi:ss', 'NLS_CALENDAR=persian') begintime,
round(DISK_BYTESREADPERSEC / 1024 / 1024) as MB_READ_SEC,
round(DISK_BYTESWRITTENPERSEC / 1024 / 1024) as MB_WRITE_SEC,
round(DISK_NUMIOSPERSEC) as IO_PER_SEC
from CHM.CHMOS_SYSTEM_SAMPLE_INT_TBL
order by IO_PER_SEC ;
BEGINTIME MB_READ_SEC MB_WRITE_SEC IO_PER_SEC
------------------- ----------- ------------ ----------
1400/11/03 09:53:20 14 147 856
1400/11/01 06:58:45 815 0 858
1400/11/01 06:39:55 314 2 858
1400/11/04 09:33:00 23 3 858Before Oracle 12c, such events were stored in files with a .bdb extension:
[grid@HostName ~]$ cd $ORACLE_HOME/crf/db/HostName
[grid@HostName HostName]$ ll *.bdb
-rw-r----- 1 root root 8192 Mar 2 10:29 crfalert.bdb
-rw-r----- 1 root root 131072 Mar 2 10:29 crfclust.bdb
-rw-r----- 1 root root 8192 Mar 2 10:29 crfconn.bdb
-rw-r----- 1 root root 8192 Mar 2 10:29 crfcpu.bdb
-rw-r----- 1 root root 8192 Mar 2 10:29 crfhosts.bdb
-rw-r----- 1 root root 8192 Mar 2 10:29 crfloclts.bdb
-rw-r----- 1 root root 8192 Mar 2 10:29 crfts.bdbIn version 12.1.0.1, it became possible to select the GIMR Database option during cluster installation (optional).
However, in 12.1.0.2, it became mandatory to configure a disk group for storing GIMR database files, and this requirement persisted through Oracle 18cR3.
Note: In all these versions, GIMR could be deleted or reinstalled after cluster setup.
Starting with 18cR5, Oracle again made GIMR installation optional (similar to 12.1.0.1). This flexibility became available when installing GI 18cR5 as a Gold Image.

In 19c, there were no major changes — the option to skip GIMR remained.
In 21c, creating a GIMR Database is not required, and by default, Oracle prevents its installation because the default setting is “Do not use a GIMR database.”
However, if you still want to use a GIMR Database in Oracle 21c, you must create it using the Oracle RAC Database Home software.
It cannot be created from Grid Infrastructure Home in this version.
To create a GIMR Database, choose the option “Use a Local GIMR database” during the GIMR Option step.

Next, you may specify a separate disk group for the GIMR database — while not mandatory, Oracle recommends isolating it for better management and performance.

Unlike previous versions, after GI installation in 21c, the GIMR database is not automatically created.
As explained in the installation notes, you must use RAC Database Home to create it manually.

If you attempt to create GIMR from Grid Infrastructure Home, you will encounter the following error:
[grid@RAC2 ~]$ /grid21c/home/bin/mgmtca createGIMRContainer -storageDiskLocation +MGMT
MGTCA-1236 : Command failed, this is not a configured Database Home.Therefore, you must install Oracle Database Home, as shown below.
Installing Oracle Database Home using the grid user
Unusually, you must install Oracle Database Home as the grid user (to create the GIMR database).
Create the directory on all nodes:
[root@RAC2 ~]# mkdir /grid21c/GIMR
[root@RAC2 ~]# chown -R grid.oinstall /grid21c/GIMR/Unzip the Oracle 21c installation file on one node:
[grid@RAC2 ~]$ unzip /source/LINUX.X64_213000_db_home.zip -d /grid21c/GIMRThen run the installer:
[grid@RAC2 ~]$ cd /grid21c/GIMR/
[grid@RAC2 GIMR]$ ./runInstallerAfter installation, execute the following command from Oracle Database Home:
[grid@RAC2 ~]$ /grid21c/GIMR/bin/mgmtca createGIMRContainer -storageDiskLocation +MGMTYou can check the log file here:
[root@RAC2 ~]# tail -f -n 1000 /grid21c/base/cfgtoollogs/dbca/_mgmtdb/_mgmtdb0.log
[ 2022-01-26 10:48:39.602 IRST ] Prepare for db operation
DBCA_PROGRESS : 10%
[ 2022-01-26 10:48:48.036 IRST ] Registering database with Oracle Grid Infrastructure
DBCA_PROGRESS : 14%
[ 2022-01-26 10:48:49.123 IRST ] Copying database files
DBCA_PROGRESS : 43%
[ 2022-01-26 10:49:56.794 IRST ] Creating and starting Oracle instance
DBCA_PROGRESS : 62%
[ 2022-01-26 10:55:36.452 IRST ] Completing Database Creation
DBCA_PROGRESS : 71%
[ 2022-01-26 10:58:40.486 IRST ] Executing Post Configuration Actions
DBCA_PROGRESS : 100%
[ 2022-01-26 10:58:40.489 IRST ] Database creation complete. For details check the logfiles at:
/grid21c/base/cfgtoollogs/dbca/_mgmtdb.
Database Information:
Global Database Name:_mgmtdb
System Identifier(SID):-MGMTDBAfter execution, the GIMR database will be created:
[grid@RAC2 ~]$ srvctl config mgmtdb
Database unique name: _mgmtdb
Database name:
Oracle home: /grid21c/GIMR
Oracle user: grid
Spfile: +MGMT/_MGMTDB/PARAMETERFILE/spfile.284.1094986549
Password file: +MGMT/_MGMTDB/PASSWORD/pwd_mgmtdb.271.1094986131
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Type: Management
PDB name: GIMR_DSCREP_10
PDB service: GIMR_DSCREP_10
Cluster name: RAC-cluster
Database instance: -MGMTDBNote: You cannot create other databases using the Oracle Home of the GIMR Database.
[grid@RAC2 ~]$ /grid21c/GIMR/bin/dbca
[DBT-10010] Database cannot be created in the current oracle home (/grid21c/GIMR).
Additional Notes
The GIMR Database is a single-instance database that runs on only one node of the cluster.
If the node hosting MGMTDB goes down, the database will automatically fail over to another available node.
[grid@RAC1 ~]$ srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node rac2Written by Vahid Yousefzadeh
I have been a DBA since 2011 and I work with Oracle technology. Linkdin: linkedin.com/in/vahidusefzadeh telegram channel ID:@oracledb vahidusefzadeh@gmail.com
Comments
Post a Comment