Wednesday, April 18, 2018

Relocate MGMTDB database from one Diskgroup to other Diskgroup


Execute the below command as root user:
/u01/app/12.1.0/grid/bin/crsctl stop res ora.crf -init
/u01/app/12.1.0/grid/bin/crsctl modify res ora.crf -attr ENABLED=0 -init

Execute the below command as Grid User:
/u01/app/12.1.0/grid/bin/srvctl stop mgmtdb
Create a CDB for the MGMTDB using DBCA
/u01/app/12.1.0/grid/bin/dbca -silent -deleteDatabase -sourceDB -MGMTDB
$/u01/app/12.1.0/grid/bin/dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -gdbName _mgmtdb -storageType ASM -diskGroupName +SASDATA1 -datafileJarLocation /u01/app/12.1.0/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck

Create a PDB within the MGMTDB using DBCA.

 Execute to find Cluster Name:
-bash-4.1$ cemutlo -n
NOTE: The CLUSTER_NAME needs to have any hyphens (“-”) replaced with underscores (“_”)

$/u01/app/12.1.0/grid/bin/dbca -silent -createPluggableDatabase -sourceDB -MGMTDB -pdbName -createPDBFrom RMANBACKUP -PDBBackUpfile /u01/app/12.1.0/grid/assistants/dbca/templates/mgmtseed_pdb.dfb -PDBMetadataFile /u01/app/12.1.0/grid/assistants/dbca/templates/mgmtseed_pdb.xml -createAsClone true

 Confirm the node on which MGMTDB is running by executing.
srvctl status MGMTDB

 Execute below command from the Node on which MGMTDB is running
mgmtca

 Execute the below command as root user:
crsctl modify res ora.crf -attr ENABLED=1 -init
crsctl start res ora.crf -init

No comments:

Post a Comment