Grid Management DB filling up ASM disk space

Recently I discovered on Oracle Grid Infrastructure 12cR2 that the ASM disk group hosting the Management DB (-MGMTDB) was filling up the disk space very quickly.

This is due to a bug on the oclumon data purge procedure.

To fix the problem, two possibilities are available:

  1. Recreate the Management DB
  2. Manually truncate the tables not purged and shrinking the Tablespace Size


Below are described the two options.


Option 1 – Recreate the Management DB

As root user on each cluster node:

# /u01/app/ stop res ora.crf -init
# /u01/app/ modify res ora.crf -attr ENABLED=0 -init


As Grid from the local node hosting the Management Database Instance run the commands:

$ /u01/app/ status mgmtdb
$ /u01/app/ -silent -deleteDatabase -sourceDB -MGMTDB
Connecting to database
4% complete
9% complete
14% complete
19% complete
23% complete
28% complete
47% complete
Updating network configuration files
48% complete
52% complete
Deleting instance and datafiles
76% complete
100% complete


How to recreate the MGMTDB:

$ /u01/app/ -silent -createDatabase -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc
-sid -MGMTDB
-gdbName _mgmtdb
-storageType ASM
-diskGroupName GIMR
-datafileJarLocation <GI HOME>/assistants/dbca/templates
-characterset AL32UTF8


Create the pluggable GIMR database

$ /u01/app/ -local



Option 2 – Manually truncate the tables


As root user stop and disable ora.crf resource on each cluster node:

# /u01/app/ stop res ora.crf -init
# /u01/app/ modify res ora.crf -attr ENABLED=0 -init


Connect to MGMTDB and identify the segments to truncate:

$ORACLE_HOME/bin/sqlplus / as sysdba
SQL> select pdb_name from dba_pdbs where pdb_name!='PDB$SEED';

SQL> alter session set container=GIMR_DSCREP_10;

Session altered.

SQL> col obj format a50
SQL> select owner||'.'||SEGMENT_NAME obj, BYTES from dba_segments where owner='CHM' order by 2 asc;


Likely those two tables are much bigger than the rest :


Truncate the tables:



Then if needed shrink the tablespace and job done!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s