MGMTDB is a repository database that saves Cluster Health Monitor (CHM) data. In Oracle 11g this information was stored in Berkeley DB ( .bdb files), but starting from Oracle database 12c it is configured as an Oracle single instance database. For more information, please check Oracle Doc ID 1568402.1
In Oracle GI 19c, the Grid Infrastructure Management Repository (GIMR) is optional for new installations of Oracle Standalone Cluster.
In FlashGrid Cluster, GIMR is disabled by default for new GI 19c deployments, but clusters upgraded from GI 12c may still contain it.
The article will walk you through the steps to delete GIMR, which helps us avoid problems with CPU consumption spikes and out of space on GRID diskgroup caused by the management repository database.
1. Remove dependency for CHA
1.1 CHA has a dependency on mgmtdb:
[root@rac1 ~]# crsctl stat res ora.chad -p | grep mgmt
START_DEPENDENCIES=hard(global:ora.mgmtdb) pullup(global:ora.mgmtdb)
STOP_DEPENDENCIES=hard(global:intermediate:ora.mgmtdb)
1.2 Remove dependency by setting the following attributes:
[root@rac1 ~]# crsctl modify resource ora.chad -attr "START_DEPENDENCIES='', STOP_DEPENDENCIES=''" -unsupported
1.3 Make sure CHA is running:
[grid@rac1 ~]$ srvctl status cha
Oracle Cluster Health Analysis Service is enabled
Oracle Cluster Health Analysis Service is running on nodes: rac1, rac2
2. Delete MGMTDB using dbca
2.1 Identify the node where mgmtdb is running:
[grid@rac1 ~]$ srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node rac1
2.2 Connect rac1 and run:
[grid@rac1 ~]$ dbca -silent -deleteDatabase -sourceDB -MGMTDB
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
39% complete
42% complete
45% complete
48% complete
52% complete
65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
84% complete
100% complete
Database deletion completed.
2.3 Make sure that MGMTDB was deleted
[grid@rac1 ~]$ srvctl status mgmtdb
PRCD-1120 : The resource for database _mgmtdb could not be found.
PRCR-1001 : Resource ora.mgmtdb does not exist
3. Delete listener called MGMTLSNR
[grid@rac1 ~]$ srvctl stop mgmtlsnr
[grid@rac1 ~]$ srvctl remove mgmtlsnr