Pythian Blog: Technical Track

Using MDBUtil To Create Grid Infrastructure Management Repository Database

Whether Grid Infrastructure Management Repository (GIMR) database MGMTDB is required or not depends on the version of Oracle you are using. For 19c, GIMR is not required - About the Grid Infrastructure Management Repository However, GIMR is being created to test Fleet Patching and Provisioning (FPP). The following Oracle documentation is useful for creating GIMR - MDBUtil: GI Management Repository configuration tool (Doc ID 2065175.1) Download mdbutil.pl from Doc ID 2065175.1.

Create GIMR database.

[oracle@ol7-19-rac1 scripts]$ ./mdbutil.pl --addmdb --target=+DATA -debug mdbutil.pl version : 1.98 2019-10-03 18:15:47: D Executing: /u01/app/19.0.0/grid/bin/srvctl status diskgroup -g DATA 2019-10-03 18:15:47: D Exit code: 0 2019-10-03 18:15:47: D Output of last command execution: Disk Group DATA is running on ol7-19-rac2,ol7-19-rac1 2019-10-03 18:15:47: I Starting To Configure MGMTDB at +DATA... 2019-10-03 18:15:47: D Executing: /u01/app/19.0.0/grid/bin/srvctl status mgmtlsnr 2019-10-03 18:15:48: D Exit code: 1 2019-10-03 18:15:48: D Output of last command execution: PRCR-1001 : Resource ora.MGMTLSNR does not exist 2019-10-03 18:15:48: D Executing: /u01/app/19.0.0/grid/bin/srvctl add mgmtlsnr 2019-10-03 18:15:50: D Exit code: 0 2019-10-03 18:15:50: D Output of last command execution: 2019-10-03 18:15:50: D Executing: /u01/app/19.0.0/grid/bin/srvctl status mgmtdb 2019-10-03 18:15:51: D Exit code: 1 2019-10-03 18:15:51: D Output of last command execution: PRCD-1120 : The resource for database _mgmtdb could not be found. 2019-10-03 18:15:51: D Executing: /u01/app/19.0.0/grid/bin/srvctl status mgmtdb 2019-10-03 18:15:52: D Exit code: 1 2019-10-03 18:15:52: D Output of last command execution: PRCD-1120 : The resource for database _mgmtdb could not be found. 2019-10-03 18:15:52: D Executing: /u01/app/19.0.0/grid/bin/srvctl stop mgmtlsnr 2019-10-03 18:15:52: D Exit code: 2 2019-10-03 18:15:52: D Output of last command execution: PRCC-1016 : MGMTLSNR was already stopped 2019-10-03 18:15:52: D Executing: /u01/app/19.0.0/grid/bin/crsctl query crs activeversion 2019-10-03 18:15:53: D Exit code: 0 2019-10-03 18:15:53: D Output of last command execution: Oracle Clusterware active version on the cluster is [19.0.0.0.0] 2019-10-03 18:15:53: D Executing: /u01/app/19.0.0/grid/bin/srvctl enable qosmserver 2019-10-03 18:15:53: D Exit code: 2 2019-10-03 18:15:53: D Output of last command execution: PRKF-1321 : QoS Management Server is already enabled. 2019-10-03 18:15:53: D Executing: /u01/app/19.0.0/grid/bin/srvctl start qosmserver 2019-10-03 18:15:54: D Exit code: 2 2019-10-03 18:15:54: D Output of last command execution: PRCC-1014 : qosmserver was already running 2019-10-03 18:15:54: I Container database creation in progress... for GI 19.0.0.0.0 2019-10-03 18:15:54: D Executing: /u01/app/19.0.0/grid/bin/dbca -silent -createDatabase -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -storageType ASM -diskGroupName DATA -datafileJarLocation /u01/app/19.0.0/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck 2019-10-03 18:29:57: D Exit code: 0 2019-10-03 18:29:57: D Output of last command execution: Prepare for db operation 2019-10-03 18:29:57: I Plugable database creation in progress... 2019-10-03 18:29:57: D Executing: /u01/app/19.0.0/grid/bin/mgmtca -local 2019-10-03 18:35:02: D Exit code: 0 2019-10-03 18:35:02: D Output of last command execution: 2019-10-03 18:35:02: D Executing: scp ./mdbutil.pl ol7-19-rac1:/tmp/ 2019-10-03 18:35:03: D Exit code: 0 2019-10-03 18:35:03: D Output of last command execution: 2019-10-03 18:35:03: I Executing "/tmp/mdbutil.pl --addchm" on ol7-19-rac1 as root to configure CHM. 2019-10-03 18:35:03: D Executing: ssh root@ol7-19-rac1 "/tmp/mdbutil.pl --addchm" root@ol7-19-rac1's password: 2019-10-03 18:37:14: D Exit code: 255 2019-10-03 18:37:14: D Output of last command execution: Authentication failed. 2019-10-03 18:37:14: W Not able to execute "/tmp/mdbutil.pl --addchm" on ol7-19-rac1 as root to configure CHM. 2019-10-03 18:37:14: D Executing: scp ./mdbutil.pl ol7-19-rac2:/tmp/ 2019-10-03 18:37:15: D Exit code: 0 2019-10-03 18:37:15: D Output of last command execution: 2019-10-03 18:37:15: I Executing "/tmp/mdbutil.pl --addchm" on ol7-19-rac2 as root to configure CHM. 2019-10-03 18:37:15: D Executing: ssh root@ol7-19-rac2 "/tmp/mdbutil.pl --addchm" root@ol7-19-rac2's password: 2019-10-03 18:37:26: D Exit code: 0 2019-10-03 18:37:26: D Output of last command execution: mdbutil.pl version : 1.98 2019-10-03 18:37:26: I MGMTDB & CHM configuration done! [oracle@ol7-19-rac1 scripts]$

 

 

Review GIMR database.

[oracle@ol7-19-rac1 scripts]$ ./mdbutil.pl --status
 mdbutil.pl version : 1.98
 2019-10-03 19:09:42: I Checking CHM status...
 2019-10-03 19:09:46: I Listener MGMTLSNR is configured and running on ol7-19-rac1
 2019-10-03 19:09:51: I Database MGMTDB is configured and running on ol7-19-rac1
 2019-10-03 19:09:52: I Cluster Health Monitor (CHM) is configured and running
 --------------------------------------------------------------------------------
 CHM Repository Path = +DATA/_MGMTDB/9406C7AC2DDD4A8DE0536538A8C00224/DATAFILE/sysmgmtdata.307.1020709915
 MGMTDB space used on DG +DATA = 26176 Mb
 --------------------------------------------------------------------------------
 
 [oracle@ol7-19-rac1 scripts]$ grep -i mgm /etc/oratab
 -MGMTDB:/u01/app/19.0.0/grid:N
 
 [oracle@ol7-19-rac1 scripts]$ . oraenv <<< -MGMTDB
 ORACLE_SID = [cdbrac1] ? The Oracle base remains unchanged with value /u01/app/oracle
 
 [oracle@ol7-19-rac1 scripts]$ srvctl status mgmtdb -v
 Database is enabled
 Instance -MGMTDB is running on node ol7-19-rac1. Instance status: Open.
 
 [oracle@ol7-19-rac1 scripts]$ srvctl status mgmtlsnr -v
 Listener MGMTLSNR is enabled
 Listener MGMTLSNR is running on node(s): ol7-19-rac1
 Detailed state on node ol7-19-rac1: STABLE
 
 [oracle@ol7-19-rac1 scripts]$ . oraenv <<< +ASM1
 ORACLE_SID = [-MGMTDB] ? The Oracle base remains unchanged with value /u01/app/oracle
 [oracle@ol7-19-rac1 scripts]$ crsctl status res ora.crf -init
 NAME=ora.crf
 TYPE=ora.crf.type
 TARGET=ONLINE
 STATE=ONLINE on ol7-19-rac1
 
 [oracle@ol7-19-rac1 scripts]$ olsnodes
 ol7-19-rac1
 ol7-19-rac2
 
 [oracle@ol7-19-rac1 scripts]$ ssh ol7-19-rac2
 Last login: Thu Oct 3 19:07:36 2019
 
 [oracle@ol7-19-rac2 ~]$ . oraenv <<< +ASM2
 ORACLE_SID = [cdbrac2] ? The Oracle base remains unchanged with value /u01/app/oracle
 [oracle@ol7-19-rac2 ~]$ crsctl status res ora.crf -init
 NAME=ora.crf
 TYPE=ora.crf.type
 TARGET=ONLINE
 STATE=ONLINE on ol7-19-rac2
 
 [oracle@ol7-19-rac2 ~]$
 
In conclusion, it's much simpler to use mdbutil.pl to create a GIMR database when required.

No Comments Yet

Let us know what you think

Subscribe by email