Downgrade ASM DATABASE_COMPATIBILITY (from 11.2.0.4.0 to 11.2.0.0.0) on 12C CRS stack.

使用Onecommand完成快速Oracle 12c RAC部署后 发现ASM database compatibilty无法设置,默认为11.2.0.4.0。 由于我们还有些数据库低于这个版本,所以需要对兼容性降级。 具体步骤如下:

 

Downgrade  ASM DATABASE_COMPATIBILITY (from 11.2.0.4.0 to 11.2.0.0.0) on 12C CRS stack.

1. Preparations before downgrade.
1.0 Collect DG statistics.
SQL> set linesize 160
SQL> col COMPATIBILITY for a12
SQL> col DATABASE_COMPATIBILITY for a16
SQL> col name for a12
SQL> col type for a6
SQL> select GROUP_NUMBER G_ID,name,type,total_mb,free_mb,HOT_USED_MB,COLD_USED_MB,REQUIRED_MIRROR_FREE_MB,USABLE_FILE_MB,
  2         compatibility,database_compatibility,STATE
  3    from V$ASM_DISKGROUP order by GROUP_NUMBER;

      G_ID NAME         TYPE     TOTAL_MB    FREE_MB HOT_USED_MB COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB COMPATIBILIT DATABASE_COMPATI STATE
---------- ------------ ------ ---------- ---------- ----------- ------------ ----------------------- -------------- ------------ ---------------- -----------
         1 DATA_DM07    NORMAL  107495424  107240156           0       255268                 5971968       50634094 12.1.0.2.0   11.2.0.4.0       MOUNTED
         2 DBFS_DG      HIGH       412480     395856           0        16624                   68704         108994 12.1.0.2.0   11.2.0.4.0       MOUNTED
         3 RECO_DM07    NORMAL   26879616   26805696           0        73920                 1493312       12656192 12.1.0.2.0   11.2.0.4.0       MOUNTED

        
1.1 Drop dbm01 test 12C database that was created during Onecommand.
[oracle@xxxxx env]$ . dbm011_env
[oracle@xxxxx env]$ export DISPLAY=10.xxx.xxx.xxx:0.0
[oracle@xxxxx env]$ dbca



1.2 move 12c GIMR mgmtdb (Grid Infrastructure Management Repository) to DBFS_DG
1.2.1 Stop and disable ora.crf resource.
On each node, as ROOT user:
#root: /u01/app/12.1.0.2/grid/bin/crsctl stop res ora.crf -init
#root: /u01/app/12.1.0.2/grid/bin/crsctl modify res ora.crf -attr ENABLED=0 -init

1.2.2 Issue the DBCA command to delete the management database
/u01/app/12.1.0.2/grid/bin/srvctl status mgmtdb

[oracle@xxxxx env]$ /u01/app/12.1.0.2/grid/bin/srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node dm07db01

On the node dm07db01 where ora.mgmtdb resource is running, delete mgmtdb by DBCA as GRID user.
/u01/app/12.1.0.2/grid/bin/dbca -silent -deleteDatabase -sourceDB -MGMTDB


2. Downgrade DATA_DM07&RECO_DM07 ASM DATABASE_COMPATIBILITY using asmca





3. Recreate mgmtdb database to DATA_DM07
3.1 create CDB mgmtdb (12.1.0.2) on any node execute the following DBCA command
/u01/app/12.1.0.2/grid/bin/dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -gdbName _mgmtdb -storageType ASM -diskGroupName DATA_DM07 -datafileJarLocation /u01/app/12.1.0.2/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck



3.2 Create a PDB within the MGMTDB using DBCA. As Grid User on any node execute the following DBCA command

/u01/app/12.1.0.2/grid/bin/dbca -silent -createPluggableDatabase -sourceDB -MGMTDB -pdbName CLUSTER_DM07 -createPDBFrom RMANBACKUP -PDBBackUpfile /u01/app/12.1.0.2/grid/assistants/dbca/templates/mgmtseed_pdb.dfb -PDBMetadataFile /u01/app/12.1.0.2/grid/assistants/dbca/templates/mgmtseed_pdb.xml -createAsClone true


3.3 Secure that the Management Database credential:
$ /u01/app/12.1.0.2/grid/bin/srvctl status MGMTDB
Database is enabled
Instance -MGMTDB is running on node
$ /u01/app/12.1.0.2/grid/bin/mgmtca

3.4 Enable and start ora.crf resource.
On each node, as root user:


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


Reference:
MGMTDB admistration using SRVCTL (Doc ID 2236247.1)
How to Move/Recreate GI Management Repository to Different Shared Storage (Diskgroup, CFS or NFS etc) (Doc ID 1589394.1)
How to move ASM spfile to a different disk group (Doc ID 1082943.1)
How to Deconfigure/Reconfigure(Rebuild OCR) or Deinstall Grid Infrastructure (Doc ID 1377349.1)

你可能感兴趣的:(Downgrade ASM DATABASE_COMPATIBILITY (from 11.2.0.4.0 to 11.2.0.0.0) on 12C CRS stack.)