<<Back to Oracle RAC Main Page
How to re-create oracle RAC -MGMTDB database
Verify Status of -MGMTDB
prompt@node1:~/ [+ASM1] srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node node1
prompt@node1:~/ [+ASM1] export ORACLE_SID=-MGMTDB
prompt@node1:~/ [-MGMTDB] sqlplus "/as sysdba"
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MGMT_PDB_01 READ WRITE NO
SQL> select comp_id,status from dba_registry;
COMP_ID STATUS
------------------------------ --------------------------------------------
CATALOG VALID
CATPROC VALID
RAC OPTION OFF
XDB VALID
OWM VALID
Stop and disable CRF component as root user. ( on all the nodes as root user)
prompt@node1:~> # /grid/product/19c/grid/bin/crsctl stop res ora.crf -init
CRS-2673: Attempting to stop 'ora.crf' on 'node1'
CRS-2677: Stop of 'ora.crf' on 'node1' succeeded
prompt@node1:~> # /grid/product/19c/grid/bin/crsctl modify res ora.crf -attr ENABLED=0 -init
node 2:
prompt@node1:~> # /grid/product/19c/grid/bin/crsctl stop res ora.crf -init
CRS-2673: Attempting to stop 'ora.crf' on 'node1'
CRS-2677: Stop of 'ora.crf' on 'node1' succeeded
prompt@node1:~> # /grid/product/19c/grid/bin/crsctl modify res ora.crf -attr ENABLED=0 -init
drop -MGMTDB DB
prompt@node1:/grid/product/19c/grid/bin/ [+ASM1] dbca -silent -deleteDatabase -sourceDB -MGMTDB
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
39% complete
42% complete
45% complete
48% complete
52% complete
65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
84% complete
100% complete
Database deletion completed.
Look at the log file "/ora_app/cfgtoollogs/dbca/_mgmtdb/_mgmtdb0.log" for further details.
Create -MGMTDB DB (only on one node)
prompt@node1:/grid/product/19c/grid/bin/ [+ASM1] dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -gdbName _mgmtdb -storageType ASM -diskGroupName +GIMR -datafileJarLocation /grid/product/19c/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck
Prepare for db operation
10% complete
Registering database with Oracle Grid Infrastructure
14% complete
Copying database files
43% complete
Creating and starting Oracle instance
45% complete
49% complete
54% complete
58% complete
62% complete
Completing Database Creation
66% complete
69% complete
71% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/ora_app/cfgtoollogs/dbca/_mgmtdb.
Database Information:
Global Database Name:_mgmtdb
System Identifier(SID):-MGMTDB
Look at the log file "/ora_app/cfgtoollogs/dbca/_mgmtdb/_mgmtdb2.log" for further details.
create NEW MGMT pluggable DB
dbca -silent -createPluggableDatabase -sourceDB -MGMTDB -pdbName MGMT_PDB_01 -createPDBFrom RMANBACKUP -PDBBackUpfile /grid/product/19c/grid/assistants/dbca/templates/pdbseed.dfb -PDBMetadataFile /grid/product/19c/grid/assistants/dbca/templates/pdbseed.xml -createAsClone true
Prepare for db operation
13% complete
Creating Pluggable Database
15% complete
19% complete
23% complete
31% complete
39% complete
53% complete
Completing Pluggable Database Creation
60% complete
Executing Post Configuration Actions
100% complete
Pluggable database "MGMT_PDB_01" plugged successfully.
Look at the log file "/ora_app/cfgtoollogs/dbca/_mgmtdb/MGMT_PDB_01/_mgmtdb0.log" for further details.
Verify Status of -MGMTDB
prompt@node1:~/ [+ASM1] srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node node1
prompt@node1:~/ [+ASM1] export ORACLE_SID=-MGMTDB
prompt@node1:~/ [-MGMTDB] sqlplus "/as sysdba"
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MGMT_PDB_01 READ WRITE NO
SQL> select comp_id,status from dba_registry;
COMP_ID STATUS
------------------------------ --------------------------------------------
CATALOG VALID
CATPROC VALID
RAC OPTION OFF
XDB VALID
OWM VALID
Run the mgmtca config tool
$/grid/product/19c/grid/bin/mgmtca
Start and enable the CRF component ( ON BOTH NODES)– Run as root user
prompt@node1:~> # /grid/product/19c/grid/bin/crsctl modify res ora.crf -attr ENABLED=1 -init
prompt@node1:~> # /grid/product/19c/grid/bin/crsctl start res ora.crf -init
CRS-2672: Attempting to start 'ora.crf' on 'node1'
CRS-2676: Start of 'ora.crf' on 'node1' succeeded
prompt@node2:~> # /grid/product/19c/grid/bin/crsctl modify res ora.crf -attr ENABLED=1 -init
prompt@node2:~> # /grid/product/19c/grid/bin/crsctl start res ora.crf -init
CRS-2672: Attempting to start 'ora.crf' on 'node2'
CRS-2676: Start of 'ora.crf' on 'node2' succeeded
Comments
Post a Comment