How to Move/Recreate GI Management Repository to Different Shared Storage (Diskgroup, CFS or NFS etc)

How to Move/Recreate GI Management Repository to Different Shared Storage (Diskgroup, CFS or NFS etc)


Reference: (Doc ID 1589394.1)

How to Move/Recreate GI Management Repository to Different Shared Storage (Diskgroup, CFS or NFS etc) (Doc ID 1589394.1)

Please be aware that you run each command with your own risk.

This procedure will NOT preserve Management Database contents. To back up manually in text format, as grid user on any node: 

/bin/oclumon dumpnodeview -allnodes -v > /ora_stage/tmp

Note:- It took horrably long time to take the backup of a 2G file. For me it took 6 days. Beleive me its 6days

as a root user
Stop and disable ora.crf resource on each node

NODE1:~ # export ORACLE_HOME=/ora_grid/product/12.1.0.2/grid
NODE1:~ # export PATH=$PATH:$ORACLE_HOME/bin
NODE1:~ # crsctl stop res ora.crf -init
CRS-2673: Attempting to stop 'ora.crf' on 'NODE1'
CRS-2677: Stop of 'ora.crf' on 'NODE1' succeeded
NODE1:~ # crsctl modify res ora.crf -attr ENABLED=0 -init


NODE2:~ # export ORACLE_HOME=/ora_grid/product/12.1.0.2/grid
NODE2:~ # export PATH=$PATH:$ORACLE_HOME/bin
NODE2:~ # crsctl stop res ora.crf -init
CRS-2673: Attempting to stop 'ora.crf' on 'NODE2'
CRS-2677: Stop of 'ora.crf' on 'NODE2' succeeded
NODE2:~ # crsctl modify res ora.crf -attr ENABLED=0 -init


2. Issue the DBCA command to delete the management database

As Grid User, locate the node that the Management Database is running by executing

oracle@NODE1:~/ [grinf12102] srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node NODE1

As Grid User on the node where ora.mgmtdb resource is running execute
Connecting to database
4% complete
9% complete
14% complete
19% complete
23% complete
28% complete
47% complete
Updating network configuration files
52% complete
Deleting instance and datafiles
76% complete
100% complete
Look at the log file "/ora_app/cfgtoollogs/dbca/_mgmtdb.log" for further details.

3. Recreate the MGMTDB


12.1.0.2 only
Please refer oracle metalink note Doc ID 1589394.1 for other version

dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -gdbName _mgmtdb -storageType ASM -diskGroupName +OCR_DATA -datafileJarLocation /ora_grid/product/12.1.0.2/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck

Registering database with Oracle Grid Infrastructure
5% complete
Copying database files
7% complete
9% complete
16% complete
23% complete
30% complete
37% complete
41% complete
Creating and starting Oracle instance
43% complete
48% complete
49% complete
50% complete
55% complete
60% complete
61% complete
64% complete
Completing Database Creation
68% complete
79% complete
89% complete
100% complete
Look at the log file "/ora_app/cfgtoollogs/dbca/_mgmtdb/_mgmtdb0.log" for further details.



The Management Database may be moved to an ASM Diskgroup, in a shared NFS/CFS location with the following command line:

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

b. Create a PDB within the MGMTDB using DBCA.

As Grid User on any node execute the following DBCA command:

dbca -silent -createPluggableDatabase -sourceDB -MGMTDB -pdbName RAC100 -createPDBFrom RMANBACKUP -PDBBackUpfile /ora_grid/product/12.1.0.2/grid/assistants/dbca/templates/mgmtseed_pdb.dfb -PDBMetadataFile /ora_grid/product/12.1.0.2/grid/assistants/dbca/templates/mgmtseed_pdb.xml -createAsClone true 

Creating Pluggable Database
4% complete
12% complete
21% complete
38% complete
55% complete
85% complete
Completing Pluggable Database Creation
100% complete
Look at the log file "/ora_app/cfgtoollogs/dbca/_mgmtdb/RAC17/_mgmtdb0.log" for further details.

4. Secure that the Management Database credential:
oracle@NODE1:~/ [grinf12102] srvctl status MGMTDB
Database is enabled
Instance -MGMTDB is running on node NODE1

On :
mgmtca

5. Enable and start ora.crf resource

On each node, as root user:
NODE1:~ # crsctl modify res ora.crf -attr ENABLED=1 -init
NODE1:~ # crsctl start res ora.crf -init
CRS-2672: Attempting to start 'ora.crf' on 'NODE1'
CRS-2676: Start of 'ora.crf' on 'deda1x2537' succeeded

No comments:

Post a Comment