Grid Ingrastructure Management Repository Database (MGMTDB)

Default location is same storage as OCR and Voting files.

Mos note 1589394.1 for moving MGMTDB AND MOS note 2065175.1 for the new MDBUtil

BACKUP THE DATA

$ GRID_HOME/bin/oclumon dumpnodeview [[-allnodes] | [-n node1 node2 noden] [-last “duration”] | [-s “time_stamp” -e “time_stamp”] [-i interval] [-v]] [-h]

Stop the cluster health monitor – on EACH node
$ GRID_HOME/bin/crsctl stop res ora.crf -init
$ GRID_HOME/bin/crsctl modify res ora.crf -attr ENABLED=0 -init

$ srvctl status mgmtdb
$ GRID_HOME/bin/dbca -silent -deleteDatabase -sourceDB -MGMTDB

$ srvctl status mgmtdb

$GRID_HOME/bin/dbca -silent -createDatabase -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -storageType ASM -diskGroupName {+NEW_DG} -datafileJarLocation $GRID_HOME/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -oui_internal

OR

$GRID_HOME/bin/dbca -silent -createDatabase -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -storageType FS -datafileDestination {NEW_FS} -datafileJarLocation $GRID_HOME/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -oui_internal

$ srvctl status mgmtdb

ONLY THE CONTAINER DB IS OPEN, WE NOW NEED TO CREATE THE PLUGGABLE DATABASE.

$ OLSNODES -c
to get the cluster name

Create the management repository pluggable database
$ GRID_HOME/bin/dbca -silent -createPluggableDatabase -sourceDB -MGMTDB -pdbName {pluggable_db_name} -createPDBFrom RMANBACKUP -PDBBackUpfile $GRID_HOME/assistants/dbca/templates/mgmtseed_pdb.dfb -PDBMetadataFile $GRID_HOME/assistants/dbca/templates/mgmtseed_pdb.xml -createAsClone true -internalSkipGIHomeCheck

SQL> select dbid,name,cdb from v$database;

$ GRID_HOME/bin/mgmtca
SQL> alter session set container=pluggable_db_name;
SQL> exec dbms_service.create_service(‘pluggable_db_name’,’pluggable_db_name’);
SQL> exec dbms_service.start_service(‘pluggable_db_name’);

$ GRID_HOME/bin/crsctl start res ora.crf -init
$ GRID_HOME/bin/oclumon manage -get reppath