After installing grid in Grid Infrastructure 12.1.0.2, you can see that there are more ora.MGMTLSNR and ora.mgmtdb in the resources. At the same time, you start an instance, sid=-MGMTDB.
[grid@prodb1 ~]$ crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE prodb1 STABLE
ONLINE ONLINE prodb2 STABLE
ora.OCR_VOTE.dg
ONLINE ONLINE prodb1 STABLE
ONLINE ONLINE prodb2 STABLE
ora.asm
ONLINE ONLINE prodb1 Started,STABLE
ONLINE ONLINE prodb2 Started,STABLE
ora.net1.network
ONLINE ONLINE prodb1 STABLE
ONLINE ONLINE prodb2 STABLE
ora.ons
ONLINE ONLINE prodb1 STABLE
ONLINE ONLINE prodb2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE prodb1 STABLE
ora.MGMTLSNR
1 ONLINE ONLINE prodb1 169.254.124.55 192.1
68.0.101,STABLE
ora.cvu
1 ONLINE ONLINE prodb1 STABLE
ora.mgmtdb
1 ONLINE ONLINE prodb1 Open,STABLE
ora.oc4j
1 ONLINE ONLINE prodb1 STABLE
ora.prodb1.vip
1 ONLINE ONLINE prodb1 STABLE
ora.prodb2.vip
1 ONLINE ONLINE prodb2 STABLE
ora.scan1.vip
1 ONLINE ONLINE prodb1 STABLE
--------------------------------------------------------------------------------
[grid@prodb1 ~]$ ps -ef |grep pmon
grid 3443 1 0 20:16 ? 00:00:00 mdb_pmon_-MGMTDB
grid 10452 1 0 19:29 ? 00:00:00 asm_pmon_+ASM1
Management Repository is a single instance database managed by Oracle Clusterware in 12c. Because it is a single instance database, it will start and run on one node in the cluster; because it is managed by GI, if the managed node closes, the database will automatically fail over to other nodes. The management database is a central repository for storing Cluster Health Monitor (CHM/OS, ora.crf) and other data in 12c. In 12.1, by default, the Management database uses the same shared storage as OCR/Voting File; in 12.2, a completely new installation allows the designation of separate disk groups.
In 12.1.0.1, GIMR is optional, and if the configuration management database is not selected during installation/upgrade, all functions dependent on it (CHM/OS) will be disabled.
GIMR installed by default in 12.1.0.2 is not optional. And it is not supported to close it except Exadata.
Start the database:
The management database is managed by GI and can be started and run automatically. If for some reason it is closed, you can start it with the following srvctl command:
Usage: srvctl start mgmtdb [- start topation < start_option >] [- node < node_name >]
Usage: srvctl start mgmtlsnr [-node < node_name >]
Log in to the database:
[grid@prodb1 ~]$ export ORACLE_SID=-MGMTDB
[grid@prodb1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on 0 21:04:42 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management and Advanced Analytics options
SQL> show parameter dump
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
background_core_dump string partial
background_dump_dest string /u01/app/12.2/grid/rdbms/log
core_dump_dest string /u01/app/grid/diag/rdbms/_mgmt
db/-MGMTDB/cdump
max_dump_file_size string unlimited
shadow_core_dump string partial
user_dump_dest string /u01/app/12.2/grid/rdbms/log
SQL> select file_id,file_name from dba_data_files;
FILE_ID FILE_NAME
------- -----------------------------------------------------------------
4 +OCR_VOTE/_MGMTDB/DATAFILE/undotbs1.259.998942293
1 +OCR_VOTE/_MGMTDB/DATAFILE/system.258.998942257
3 +OCR_VOTE/_MGMTDB/DATAFILE/sysaux.257.998942237
View trc:
[grid@prodb1 ~]$ cd /u01/app/grid/diag/rdbms/_mgmtdb/
[grid@prodb1 _mgmtdb]$ cd -MGMTDB/ #Direct cd will report errors
-bash: cd: -M: invalid option
cd: usage: cd [-L|[-P [-e]]] [dir]
[grid@prodb1 _mgmtdb]$ cd ./-MGMTDB/
[grid@prodb1 -MGMTDB]$ cd trace
[grid@prodb1 trace]$ ls
-MGMTDB_aqpc_30744.trc
-MGMTDB_dbw0_23833.trm -MGMTDB_m000_31720.trc -MGMTDB_ora_1441.trm
-MGMTDB_ora_30748.trc -MGMTDB_rbal_3479.trm
-MGMTDB_aqpc_30744.trm
-MGMTDB_dbw0_24548.trc -MGMTDB_m000_31720.trm -MGMTDB_ora_1568.trc
-MGMTDB_ora_30748.trm -MGMTDB_tt00_24976.trc
Clean up trc:
[grid@prodb1 trace]$ adrci
ADRCI: Release 12.1.0.2.0 - Production on 0 21:11:07 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/grid"
adrci> show home
ADR Homes:
diag/rdbms/_mgmtdb/-MGMTDB
adrci> purge -age 0
adrci> quit
[grid@prodb1 trace]$ ls
alert_-MGMTDB.log
Backup database:
oracle did not specify the need to back up the database.
Listening Port:
In version 12.2, the MGMT listener defaults to 1525.
Space requirements:
Applicable to: Oracle Cluster Registry (OCR) and Grid Infrastructure Management Repository with External Redundancy
Minimum: OCR volumes containing Grid Infrastructure Management Repository (4.5 GB + 300 MB voting file + 400 MB OCR) are at least 5.2 GB. For clusters with more than four nodes, each node is added 500 MB. For example, the six-node cluster allocation should be 6.2 GB.
Reference: http://docs.oracle.com/database/121/CWLIN/storage.htm#CHDDCAHD
The actual installation process of 12.1.0.2 requires a total of about 5.9G of space.