在Grid Infrastructure 12.1.0.2 中安装完grid,可以看到资源中多了ora.MGMTLSNR及ora.mgmtdb,同时启动了一个实例,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是一个由Oracle Clusterware在12c中管理的单实例数据库。由于它是单实例数据库,它将在集群中的一个节点上启动并运行; 因为它由GI管理,如果托管节点关闭,数据库将自动故障转移到其他节点。管理数据库在12c中存储Cluster Health Monitor(CHM / OS,ora.crf)和其他数据的中央存储库。在12.1中,默认情况下,Management数据库使用与OCR/Voting File相同的共享存储; 在12.2中,全新安装允许指定单独的磁盘组。
在12.1.0.1中,GIMR是可选的,如果未选择在安装/升级期间配置管理数据库,则将禁用依赖于它的所有功能(CHM / OS)。
在12.1.0.2中默认安装GIMR,不可选。并且除Exadata之外不支持关闭它。
启动数据库:
管理数据库由GI管理,可自动启动并运行。如果由于某种原因它已关闭,可以使用以下srvctl命令启动:
用法:srvctl start mgmtdb [-startoption <start_option>] [-node <node_name>]
用法:srvctl start mgmtlsnr [-node <node_name>]
登录数据库:
[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
查看trc:
[grid@prodb1 ~]$ cd /u01/app/grid/diag/rdbms/_mgmtdb/
[grid@prodb1 _mgmtdb]$ cd -MGMTDB/ #直接cd会报错
-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
清理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
备份数据库:
oracle未说明需要备份该数据库。
监听端口:
在12.2版本中,MGMT监听器默认为1525。
空间要求:
适用于:具有外部冗余的Oracle Cluster Registry(OCR)和Grid Infrastructure Management Repository
最低:包含Grid Infrastructure Management Repository(4.5 GB + 300 MB表决文件+ 400 MB OCR)的OCR卷至少为5.2 GB,对于超过四个节点的集群,每个节点加500 MB。例如,六节点群集分配应为6.2 GB。
参考:http://docs.oracle.com/database/121/CWLIN/storage.htm#CHDDCAHD
实际安装过程12.1.0.2总共需要约5.9G空间。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。