This post validated Oracle note Doc ID 1589394.1.This note outlines the steps to move 12c GIMR (Grid Infrastructure Management Repository) to a different shared storage. In my environment I am using a 2 node system.  I am moving the GI Management Repository to Different Shared Storage +FASTDISK. This example is using version 12.1.0.2.

Take a backup:

[oracle-00.qa.alinafe.net:oracle:+ASM2:$~]:/u01/app/12.1.0/grid_1/bin/oclumon dumpnodeview -allnodes -v > GI_MoveBackup

1. Stop and disable ora.crf resource.

On each node, as root user:

[oracle-00.qa.alinafe.net:oracle:+ASM2:$~]:/u01/app/12.1.0/grid_1/bin/crsctl stop res ora.crf -init
[oracle-00.qa.alinafe.net:oracle:+ASM2:$~]:/u01/app/12.1.0/grid/bin/crsctl modify res ora.crf -attr ENABLED=0 -init

[oracle-01.qa.alinafe.net:oracle:+ASM2:$~]:/u01/app/12.1.0/grid_1/bin/crsctl stop res ora.crf -init
#[oracle-01.qa.alinafe.net:oracle:+ASM2:$~]:
/u01/app/12.1.0/grid_1/bin/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-01.qa.alinafe.net:oracle:+ASM2:$~]:
/u01/app/12.1.0/grid/bin/srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node oracle-test01

[oracle-01.qa.alinafe.net:oracle:ASM2:$~]: /u01/app/12.1.0/grid/bin/dbca -silent -deleteDatabase -sourceDB -MGMTDB
Connecting to database
4% complete
9% complete
14% complete
19% complete
23% complete
28% complete
47% complete
Updating network configuration files
48% complete
52% complete
Deleting instance and datafiles
76% complete
100% complete
Look at the log file “/u01/app/oracle/cfgtoollogs/dbca/_mgmtdb0.log” for further details.

#3B. For 12.1.0.2 only:

#a. As Grid User on any node execute the following DBCA command with the desired <DG Name>:

[oracle-01.qa.alinafe.net:oracle:+ASM2:$~]: /u01/app/12.1.0/grid/bin/dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -gdbName _mgmtdb -storageType ASM -diskGroupName +FASKDISK -datafileJarLocation /u01/app/12.1.0/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 “/u01/app/oracle/cfgtoollogs/dbca/_mgmtdb/_mgmtdb0.log” for further details.

#As Grid User on any node execute the following DBCA command:
NOTE: The CLUSTER_NAME needs to have any hyphens (“-“) replaced with underscores (“_”)
i.e. some-scan to some_scan

[oracle-01.qa.alinafe.net:oracle:+ASM2:$~]/u01/app/12.1.0/grid/bin/dbca -silent -createPluggableDatabase -sourceDB -MGMTDB -pdbName some_scan -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

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 “/u01/app/oracle/cfgtoollogs/dbca/_mgmtdb/some_scan/_mgmtdb0.log” for further details.

[oracle-01.qa.alinafe.net:oracle:+ASM2:$~]: /u01/app/12.1.0/grid/bin/srvctl status MGMTDB
Database is enabled
Instance -MGMTDB is running on node d01
#4. Secure that the Management Database credential:

#As Grid User, confirm the node on which MGMTDB is running by executing.

/u01/app/12.1.0/grid/bin/mgmtca

#5. Enable and start ora.crf resource.

#On each node, as root user:
[oracle-01.qa.alinafe.net:root ~]# /u01/app/12.1.0/grid/bin/crsctl modify res ora.crf -attr ENABLED=1 -init
#[oracle-01.qa.alinafe.net:root ~]#
/u01/app/12.1.0/grid/bin/crsctl modify res ora.crf -attr ENABLED=1 -init
[oracle-01.qa.alinafe.net:roo ~]# /u01/app/12.1.0/grid/bin/crsctl modify res ora.crf -attr ENABLED=1 -init
[oracle-00.qa.alinafe.net:root:+ASM2 ~]# /u01/app/12.1.0/grid/bin/crsctl start res ora.crf -init
CRS-2672: Attempting to start ‘ora.crf’ on ‘d00’
CRS-2676: Start of ‘ora.crf’ on ‘d00’ succeeded
[oracle-00.qa.alinafe.net:root:+ASM2 ~]# /u01/app/12.1.0/grid/bin/crsctl start res ora.crf -init
CRS-2672: Attempting to start ‘ora.crf’ on ‘d01’
CRS-2676: Start of ‘ora.crf’ on ‘d01’ succeeded

#[oracle-00.qa.alinafe.net:oracle:+ASM2:$~]:
/u01/app/12.1.0/grid/bin/srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node oracle-test01

[oracle-01.qa.alinafe.net:oracle:+ASM2:$~]: oclumon manage -get reppath

CHM Repository Path = +FASTDISK/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata.291.913757899

[oracle-01.qa.alinafe.net:oracle:+ASM2:$~]: srvctl config mgmtdb
Database unique name: _mgmtdb
Database name:
Oracle home: <CRS home>
Oracle user: oracle
Spfile: +FASTDISK/_MGMTDB/PARAMETERFILE/spfile.292.913757517
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Type: Management
PDB name: qadc_scan
PDB service: qadc_scan
Cluster name: qadc-scan
Database instance: -MGMTDB

Advertisements