sql >> Database teknologi >  >> RDS >> Database

Tablespace SYSMGMTDATA er FULD i Grid Infrastructure Management Repository (MGMTDB)

MGMTDB er en ny databaseinstans, som bruges til lagring af Cluster Health Monitor (CHM) data.

I Oracle 11g blev disse oplysninger gemt i Berkley-databasen (.bdb-filer), i $GRID_HOME/crf/db/hostname, men fra Oracle-database 12c er den konfigureret som en Oracle Single Instance.

I Oracle 12.1.0.1 er Grid Infrastructure Management Repository (GIMR) valgfrit.

I Oracle 12.1.0.2 er det obligatorisk, og det er ikke understøttet at blive slået fra med undtagelse af 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

Nedenstående advarsel modtaget fra Grid Control af SYSMGMTDATA tablespace med 91 % besat:

Variablerne inkluderet i oraEMNGAlert-fælden.
oraEMNGEventTargetName =-MGMTDB_exadb015.PDB_CLUSTER
oraEMNGEventMessage =SYSMGMTDATA tablespacet har 91.314453125 optaget .
oraEMNGEventSeverityCode =KRITISK
oraEMNGEventReportedTime =31. maj 2020 7:31:27 PM BRT
oraEMNGEventCategories =Kapacitet
oraEMNGEventType =Metric Alert
oraEMNGEventTargetType =Plugbar database
oraEMNGEventHostName =exadb015
oraEMNGEventTargetVersion =12.1.0.2.0
oraEMNGEventUserDefinedTgtProp =Operativsystem=Linux, Platform=x86_64,
oraEMNGEventRulespace =space

Tjek det aktuelle CHM-lager:


# oclumon manage -get reppath
CRS-9001-internal error
CRS-9010-Error manage: mandatory data not supplied

Fejlen opstår, fordi ressourcen er offline:


# crsctl stat res ora.crf -init
NAME=ora.crf
TYPE=ora.crf.type
TARGET=ONLINE
STATE=OFFLINE

Aktiver ora.crf-ressourcen:


# cd /u01/app/12.1.0.2/grid/bin/
# ./crsctl modify res ora.crf -attr ENABLED=1 -init

Start ora.crf-ressourcen manuelt ved at bruge nedenstående kommando:


# crsctl start res ora.crf -init
CRS-2672: Attempting to start 'ora.crf' on 'exadb015'
CRS-2676: Start of 'ora.crf' on 'exadb015' succeeded

Ressource er 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
--------------------------------------------------------------------------------

Viser status for den aktuelle konfiguration:


# 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

Tjek det aktuelle CHM-lager:


# 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

Ændr størrelsen på datafilen. Jeg øgede størrelsen fra 2048M til 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.

Andre måder at løse pladsproblemet i tablespace SYSMGMTDATA i GIMR Database:

– Flyt GIMR-lageret til en anden delt lagring (Diskgruppe, CFS eller NFS osv.) i henhold til Doc ID 1589394.1.

– Afkort de store borde, der ejes af CHM i henhold til Doc ID 2177879.1.

Normalt kan nedenstående to tabeller afkortes:


sql> truncate table CHM.CHMOS_PROCESS_INT_TBL;
sql> truncate table CHM.CHMOS_DEVICE_INT_TBL;

Sporingsfilerne MGMTDB kan findes som standard i:


$DIAG_HOME/_mgmtdb/-MGMTDB/trace


  1. Fejl ved installation af mysql2:Kunne ikke bygge gem native-udvidelse

  2. Sådan opretter du en tabel fra en anden tabel i SQL

  3. Bedste måde at køre Oracle-forespørgsler med jævne mellemrum

  4. Tuples er ikke indsat sekventielt i databasetabellen?