I must thank my fellow DBA Franky Weber Faust for his publication in his blog.
In this article, we are going to know about how to rebuilding/moving MGMTDB on grid infrastructure 12c.

Stop the ora.crf resource on each node in your cluster and disable it so that it does not start automatically:

If your MGMTDB is functional you will be able to remove it through the DBCA. If it has a problem that does not let it start you will not be able to remove it. In my case, the tablespace UNDOTBS1 was corrupted, so it was not possible to open the database and consequently could not delete it via DBCA:

Browsing the MGMTDB alert.log I identified that the problem was the Undo tablespace:

So I opted to manually remove the MGMTDB. Use asmcmd to find the datafiles:

Then inside the MGMTDB directory remove all your files:

Remove from the / etc / oratab file the line for MGMTDB:

You now have to remove the MGMTDB resource from the cluster. As we can see the database is still part of the cluster configuration:

Remove the MGMTDB from the configuration, this way it will be deleted from the Oracle Cluster Registry (OCR):

Once all this is done, we can start the re-creation. When executing the MGMTDB creation command we can define another diskgroup to store it. Note the -diskGroupName parameter below:

After the CDB is created we need to create a PDB with the name of our cluster. If you do not know the name of your cluster run:

In the name of the cluster we will create the PDB:

Look at the log file “/u01/app/oracle/cfgtoollogs/dbca/_mgmtdb/rac/_mgmtdb0.log” for further details.
The database creation is complete and we can see that it is already present in the cluster again:

One more step is needed to properly configure the MGMTDB (this command does not return any rows but is part of the configuration):

Once this is done, just enable the ora.crf resource again and start it on each cluster node:

Note: ora.crf is the Cluster Health Monitor feature, is managed by the ohasd daemon, and is part of the Oracle Clusterware startup features.

Leave a Reply