在Grid Infrastructure 12.1.0.2 中安裝完grid,可以看到資源中多了ora.MGMTLSNR及ora.mgmtdb,同時啟動了一個實例,sid=-MGMTDB.
讓客戶滿意是我們工作的目標,不斷超越客戶的期望值來自于我們對這個行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價值的長期合作伙伴,公司提供的服務(wù)項目有:空間域名、虛擬空間、營銷軟件、網(wǎng)站建設(shè)、中陽網(wǎng)站維護、網(wǎng)站推廣。
[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中管理的單實例數(shù)據(jù)庫。由于它是單實例數(shù)據(jù)庫,它將在集群中的一個節(jié)點上啟動并運行; 因為它由GI管理,如果托管節(jié)點關(guān)閉,數(shù)據(jù)庫將自動故障轉(zhuǎn)移到其他節(jié)點。管理數(shù)據(jù)庫在12c中存儲Cluster Health Monitor(CHM / OS,ora.crf)和其他數(shù)據(jù)的中央存儲庫。在12.1中,默認情況下,Management數(shù)據(jù)庫使用與OCR/Voting File相同的共享存儲; 在12.2中,全新安裝允許指定單獨的磁盤組。
在12.1.0.1中,GIMR是可選的,如果未選擇在安裝/升級期間配置管理數(shù)據(jù)庫,則將禁用依賴于它的所有功能(CHM / OS)。
在12.1.0.2中默認安裝GIMR,不可選。并且除Exadata之外不支持關(guān)閉它。
啟動數(shù)據(jù)庫:
管理數(shù)據(jù)庫由GI管理,可自動啟動并運行。如果由于某種原因它已關(guān)閉,可以使用以下srvctl命令啟動:
用法:srvctl start mgmtdb [-startoption ] [-node ]
用法:srvctl start mgmtlsnr [-node ]
登錄數(shù)據(jù)庫:
[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
備份數(shù)據(jù)庫:
oracle未說明需要備份該數(shù)據(jù)庫。
監(jiān)聽端口:
在12.2版本中,MGMT監(jiān)聽器默認為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,對于超過四個節(jié)點的集群,每個節(jié)點加500 MB。例如,六節(jié)點群集分配應(yīng)為6.2 GB。
參考:http://docs.oracle.com/database/121/CWLIN/storage.htm#CHDDCAHD
實際安裝過程12.1.0.2總共需要約5.9G空間。