Wednesday, August 26, 2015

Create 12c MGMT database manually in RAC step by step

MGMTDB is a repository database used to store and manage grid infrastructure (CHM) data. Its manadatory from 12.1.0.2, but sometimes when you do Silent Install there are few chances you don't see its getting installed. So please check the below steps to configure it.


[Sajid@sajidserver01 ~]$  su - root
[root@sajidserver01 ~]# cd /usr/app/12.1.0/grid/bin
[root@sajidserver01 bin]# ./crsctl stop res ora.crf -init
CRS-2673: Attempting to stop 'ora.crf' on 'sajidserver01'
CRS-2677: Stop of 'ora.crf' on 'sajidserver01' succeeded

[root@sajidserver01 bin]# ./crsctl modify res ora.crf -attr ENABLED=0 -init
[root@sajidserver01 bin]# pwd
/usr/app/12.1.0/grid/bin

[Sajid@sajidserver01 ~]$  su - grid
[grid@sajidserver01 ~]$ asmcmd

Look for the Diskgroups
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name

[grid@sajidserver01 ~]$ /GRID_HOME/bin/dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -gdbName      _mgmtdb -storageType ASM -diskGroupName +<CRS DG> -datafileJarLocation /GRID_HOME/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 "/usr/app/grid/cfgtoollogs/dbca/_mgmtdb/_mgmtdb.log" for further details.

[grid@sajidserver01 ~]$ cd /usr/app/grid/cfgtoollogs/dbca
[grid@sajidserver01 dbca]$ cd _mgmtdb/
[grid@sajidserver01 _mgmtdb]$ ls
catbundleapply0.log              CloneRmanRestore.log      lockAccount.log                               plugDatabase.log    rmanUtil         trace.log.lck
catbundleapply_catcon_14062.lst  dbmssml0.log              _mgmtdb.log                                   postDBCreation.log  tempControl.ctl  utlrp0.log
cloneDBCreation.log              dbmssml_catcon_13914.lst  OraGI12Home1__mgmtdb_creation_checkpoint.xml  postScripts.log     trace.log        utlrp_catcon_14127.lst

[grid@sajidserver01 _mgmtdb]$ more _mgmtdb.log

Validation of server pool succeeded.
Registering database with Oracle Grid Infrastructure
DBCA_PROGRESS : 5%
Copying database files
DBCA_PROGRESS : 7%
DBCA_PROGRESS : 9%
DBCA_PROGRESS : 16%
DBCA_PROGRESS : 23%
DBCA_PROGRESS : 30%
DBCA_PROGRESS : 37%
DBCA_PROGRESS : 41%
Creating and starting Oracle instance
DBCA_PROGRESS : 43%
DBCA_PROGRESS : 48%
DBCA_PROGRESS : 49%
DBCA_PROGRESS : 50%
DBCA_PROGRESS : 55%
DBCA_PROGRESS : 60%
DBCA_PROGRESS : 61%
DBCA_PROGRESS : 64%
Completing Database Creation
DBCA_PROGRESS : 68%
DBCA_PROGRESS : 79%
DBCA_PROGRESS : 89%
DBCA_PROGRESS : 100%
Database creation complete. For details check the logfiles at:
 /usr/app/grid/cfgtoollogs/dbca/_mgmtdb.
Database Information:
Global Database Name:_mgmtdb
System Identifier(SID):-MGMTDB

[grid@sajidserver01 _mgmtdb]$ ps -ef|grep pmon
grid     14969     1  0 13:40 ?        00:00:00 mdb_pmon_-MGMTDB
grid     16744  8481  0 13:41 pts/0    00:00:00 grep pmon
grid     60139     1  0 13:08 ?        00:00:00 asm_pmon_+ASM1
oracle   60767     1  0 13:08 ?        00:00:00 ora_pmon_Sajid1

[grid@sajidserver01 _mgmtdb]$ cd $GRID_HOME/bin

[grid@sajidserver01 bin]$ srvctl status MGMTDB
Database is enabled
Instance -MGMTDB is running on node sajidserver01

[root@Sajidserver02 bin]# ./crsctl modify res ora.crf -attr ENABLED=1 -init
[root@Sajidserver02 bin]# ./crsctl start res ora.crf -init
CRS-2672: Attempting to start 'ora.crf' on 'Sajidserver02'
CRS-2676: Start of 'ora.crf' on 'Sajidserver02' succeeded
[root@Sajidserver02 bin]# ./crsctl status res ora.crf -init
NAME=ora.crf
TYPE=ora.crf.type
TARGET=ONLINE
STATE=ONLINE on Sajidserver02

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi Sajid.. this blog is very helpful..But i have installed 12c GI on AIX 7.1 power system in that my mgmt DB was failed...i'm doing this setup in production Environment..I could not even see the option in GUI for Grid Infrastructure Management Repository...can u suggest something for this scenario..??


    ReplyDelete