MGMTDB adalah instans database baru yang digunakan untuk menyimpan data Cluster Health Monitor (CHM).
Di Oracle 11g, informasi ini disimpan di database Berkley (file .bdb), di $GRID_HOME/crf/db/hostname, tetapi mulai dari database Oracle 12c dikonfigurasi sebagai Oracle Single Instance.
Di Oracle 12.1.0.1, Grid Infrastructure Management Repository (GIMR) bersifat opsional.
Di Oracle 12.1.0.2 itu wajib dan tidak didukung untuk dimatikan dengan pengecualian Exadata.
# ps -ef |grep mdb_pmon oracle 4961 4124 0 11:05 pts/2 00:00:00 grep --color=auto mdb_pmon grid 40414 1 0 2018 ? 01:04:31 mdb_pmon_-MGMTDB
Peringatan peringatan di bawah ini diterima dari Grid Control dari tablespace SYSMGMTDATA dengan 91% terisi:
Variabel yang disertakan dalam jebakan oraEMNGAlert.
oraEMNGEventTargetName =-MGMTDB_exadb015.PDB_CLUSTER
oraEMNGEventMessage =Ruang tabel SYSMGMTDATA telah terisi 91.314453125 .
oraEMNGEventSeverityCode =KRITIS
oraEMNGEventReportedTime =31 Mei 2020 19:31:27 BRT
oraEMNGEventCategories =Kapasitas
oraEMNGEventType =Metric Alert
oraEMNGEventTargetType =Database yang Dapat Dicolokkan
oraEMNGEventHostName =exadb015
oraEMNGEventTargetVersion =12.1.0.2.0
oraEMNGEventUserDefinedTgtProp =Sistem Operasi=Linux, Platform=x86_64,
oraEMNGEventRuleName =Tablespace, Tablespace
Periksa repositori CHM saat ini:
# oclumon manage -get reppath CRS-9001-internal error CRS-9010-Error manage: mandatory data not supplied
Kesalahan terjadi karena sumber daya sedang offline:
# crsctl stat res ora.crf -init NAME=ora.crf TYPE=ora.crf.type TARGET=ONLINE STATE=OFFLINE
Aktifkan sumber daya ora.crf:
# cd /u01/app/12.1.0.2/grid/bin/ # ./crsctl modify res ora.crf -attr ENABLED=1 -init
Mulai sumber ora.crf secara manual menggunakan perintah di bawah ini:
# crsctl start res ora.crf -init CRS-2672: Attempting to start 'ora.crf' on 'exadb015' CRS-2676: Start of 'ora.crf' on 'exadb015' succeeded
Sumber daya sedang online:
# crsctl stat res ora.crf -init NAME=ora.crf TYPE=ora.crf.type TARGET=ONLINE STATE=ONLINE on exadb015 # crsctl stat res ora.mgmtdb -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.mgmtdb 1 ONLINE ONLINE exadb015 Open,STABLE --------------------------------------------------------------------------------
Menampilkan status konfigurasi saat ini:
# srvctl config mgmtdb Database unique name: _mgmtdb Database name: Oracle home: <CRS home> Oracle user: grid Spfile: +DG_OCRVOTING/_MGMTDB/PARAMETERFILE/spfile.268.886174866 Password file: Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Type: Management PDB name: pdb_cluster PDB service: pdb_cluster Cluster name: pdb-cluster Database instance: -MGMTDB
Periksa repositori CHM saat ini:
# oclumon manage -get reppath CHM Repository Path = +DG_OCRVOTING/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/SYSMGMTDATA.269.886174975 # asmcmd ls -ls +DG_OCRVOTING/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/SYSMGMTDATA.269.886174975 Type Redund Striped Time Sys Block_Size Blocks Bytes Space Name DATAFILE HIGH COARSE JUN 01 12:00:00 Y 8192 262145 2147491840 6467616768 SYSMGMTDATA.269.886174975
Ubah ukuran file data. Saya meningkatkan ukurannya dari 2048M menjadi 3072M:
$ export ORACLE_SID=-MGMTDB $ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Mon Jun 1 13:32:46 2020 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: 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 pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB_CLUSTER READ WRITE NO sql> alter session set container=PDB_CLUSTER; Session altered. sql> select TABLESPACE_NAME,FILE_NAME,AUTOEXTENSIBLE,BYTES/1024/1024 MB, MAXBLOCKS/1024/1024 from dba_data_files where TABLESPACE_NAME='SYSMGMTDATA'; TABLESPACE_NAME FILE_NAME AUT MB MAXBLOCKS/1024/1024 --------------- --------- ---- ------ -------------------- SYSMGMTDATA +DG_OCRVOTING/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata.269.886174975 NO 2048 0 sql> alter database datafile '+DG_OCRVOTING/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata.269.886174975' resize 3072m; Database altered.
Cara lain untuk memecahkan masalah ruang di tablespace SYSMGMTDATA di Basis Data GIMR:
– Pindahkan Repositori GIMR ke Penyimpanan Bersama yang Berbeda (Diskgroup, CFS atau NFS dll) sesuai dengan ID Dokumen 1589394.1.
– Potong tabel besar yang dimiliki oleh CHM sesuai dengan ID Dokumen 2177879.1.
Biasanya dua tabel di bawah ini dapat dipotong:
sql> truncate table CHM.CHMOS_PROCESS_INT_TBL; sql> truncate table CHM.CHMOS_DEVICE_INT_TBL;
File jejak instance MGMTDB dapat ditemukan secara default di:
$DIAG_HOME/_mgmtdb/-MGMTDB/trace