Saturday, July 7, 2018

Downgrading Grid Infrastructure from V12.2.0.1.0 to V12.1.0.2.0

Downgrading Grid Infrastructure from V12.2.0.1.0 to V12.1.0.2.0


We have recently upgraded from Grid Infrastructure from (12.1.0.2.0) to (12.2.0.1.0) in Oracle Exadata x7-2 and for 
some reason we have planned to downgrade from Grid Infrastructure (12.2.0.1.0) to (12.1.0.2.0). 
It is straight forward method and Oracle documentation too good for this process.

Delete the Oracle Grid Infrastructure 12c Release 2 (12.2) Management Database

==================================================================================
dbca -silent -deleteDatabase -sourceDB -MGMTDB

[oracle@rac2-12c ~]$ ps -ef | grep pmon
oracle    5679     1  0 07:09 ?        00:00:00 asm_pmon_+ASM2
oracle    6478     1  0 07:09 ?        00:00:00 apx_pmon_+APX2
oracle    6755     1  0 07:10 ?        00:00:00 mdb_pmon_-MGMTDB
oracle   16873     1  0 07:14 ?        00:00:00 ora_pmon_contdb2
oracle   26100 25673  0 07:25 pts/1    00:00:00 grep pmon

Run “rootcrs.sh –downgrade” to downgrade Oracle Grid Infrastructure on all nodes except the first node.
========================================================================================================
[oracle@rac2-12c ~]$ su - root
Password:
[root@rac2-12c ~]# . oraenv
ORACLE_SID = [root] ? +ASM2
The Oracle base has been set to /u01/app/oracle

[root@rac2-12c ~]# /u01/app/12.2.0/grid/crs/install/rootcrs.sh -downgrade

Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/oracle/crsdata/rac2-12c/crsconfig/crsdowngrade_rac2-12c_2018-07-03_07-27-42AM.log
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac2-12c'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'rac2-12c'
CRS-2673: Attempting to stop 'ora.chad' on 'rac1-12c'
CRS-2673: Attempting to stop 'ora.chad' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.acfs_dg.vol1.acfs' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.contdb.serv2.svc' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.qosmserver' on 'rac2-12c'
CRS-2677: Stop of 'ora.contdb.serv2.svc' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.contdb.db' on 'rac2-12c'
CRS-2677: Stop of 'ora.acfs_dg.vol1.acfs' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.ACFS_DG.VOL1.advm' on 'rac2-12c'
CRS-2677: Stop of 'ora.ACFS_DG.VOL1.advm' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.proxy_advm' on 'rac2-12c'
CRS-2677: Stop of 'ora.contdb.db' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.ACFS_DG.dg' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.cvu' on 'rac2-12c'
CRS-2673: Attempting to stop 'xag.gg_1-vip.vip' on 'rac2-12c'
CRS-2677: Stop of 'ora.ACFS_DG.dg' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.rac2-12c.vip' on 'rac2-12c'
CRS-2677: Stop of 'ora.DATA.dg' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac2-12c'
CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.scan2.vip' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.scan3.vip' on 'rac2-12c'
CRS-2677: Stop of 'ora.cvu' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac2-12c'
CRS-2677: Stop of 'xag.gg_1-vip.vip' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.chad' on 'rac1-12c' succeeded
CRS-2677: Stop of 'ora.chad' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.mgmtdb' on 'rac2-12c'
CRS-2677: Stop of 'ora.scan2.vip' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.qosmserver' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.rac2-12c.vip' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.scan3.vip' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.mgmtdb' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'rac2-12c'
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.proxy_advm' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.MGMTLSNR' on 'rac2-12c' succeeded
CRS-2672: Attempting to start 'ora.MGMTLSNR' on 'rac1-12c'
CRS-2672: Attempting to start 'ora.qosmserver' on 'rac1-12c'
CRS-2672: Attempting to start 'ora.scan2.vip' on 'rac1-12c'
CRS-2672: Attempting to start 'ora.scan3.vip' on 'rac1-12c'
CRS-2672: Attempting to start 'ora.cvu' on 'rac1-12c'
CRS-2672: Attempting to start 'ora.rac2-12c.vip' on 'rac1-12c'
CRS-2672: Attempting to start 'xag.gg_1-vip.vip' on 'rac1-12c'
CRS-2676: Start of 'ora.cvu' on 'rac1-12c' succeeded
CRS-2676: Start of 'ora.scan2.vip' on 'rac1-12c' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'rac1-12c'
CRS-2676: Start of 'ora.scan3.vip' on 'rac1-12c' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'rac1-12c'
CRS-2676: Start of 'ora.rac2-12c.vip' on 'rac1-12c' succeeded
CRS-2676: Start of 'xag.gg_1-vip.vip' on 'rac1-12c' succeeded
CRS-2676: Start of 'ora.MGMTLSNR' on 'rac1-12c' succeeded
CRS-2672: Attempting to start 'ora.mgmtdb' on 'rac1-12c'
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'rac1-12c' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'rac1-12c' succeeded
CRS-2676: Start of 'ora.qosmserver' on 'rac1-12c' succeeded
CRS-2676: Start of 'ora.mgmtdb' on 'rac1-12c' succeeded
CRS-2672: Attempting to start 'ora.chad' on 'rac1-12c'
CRS-2676: Start of 'ora.chad' on 'rac1-12c' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'rac2-12c'
CRS-2677: Stop of 'ora.ons' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac2-12c'
CRS-2677: Stop of 'ora.net1.network' on 'rac2-12c' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac2-12c' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.crf' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac2-12c'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.crf' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac2-12c'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac2-12c'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac2-12c'
CRS-2677: Stop of 'ora.ctssd' on 'rac2-12c' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac2-12c'
CRS-2677: Stop of 'ora.cssd' on 'rac2-12c' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac2-12c'
CRS-2677: Stop of 'ora.gipcd' on 'rac2-12c' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac2-12c' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2018/07/03 07:30:20 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.
2018/07/03 07:30:47 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
2018/07/03 07:30:47 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2018/07/03 07:31:12 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2018/07/03 07:31:12 CLSRSC-591: successfully downgraded Oracle Clusterware stack on this node
[root@rac2-12c ~]#

Execute the same command in other nodes i.e rac1-12c
==================================================
[oracle@rac1-12c ~]$ su - root
Password:
[root@rac1-12c ~]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/oracle
[root@rac1-12c ~]# /u01/app/12.2.0/grid/crs/install/rootcrs.sh -downgrade

Set Oracle Grid Infrastructure 12c Release 1 (12.1) Grid home as the active Oracle Clusterware home
======================================================================================================
$ cd /u01/app/12.1.0.2/grid/oui/bin
$./runInstaller -nowait -waitforcompletion -ignoreSysPrereqs -updateNodeList -silent CRS=true 
ORACLE_HOME=/u01/app/12.1.0.2/grid "CLUSTER_NODES=rac1-12c,rac2-12c"

Start the 12.1 Oracle Clusterware stack on all nodes.
====================================================
[oracle@rac1-12c ~]$ su - root
Password:
[root@rac1-12c ~]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/oracle

[root@rac1-12c ~]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

[root@rac1-12c ~]# ps -ef | grep pmon
oracle   10415     1  0 07:49 ?        00:00:00 asm_pmon_+ASM1
root     16414  4942  0 07:52 pts/1    00:00:00 grep pmon

[root@rac2-12c bin]# ./crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

[root@rac2-12c bin]# ps -ef | grep pmon
oracle    5059     1  0 07:50 ?        00:00:00 asm_pmon_+ASM2
root      9921 26564  0 07:51 pts/1    00:00:00 grep pmon

On any node, remove the MGMTDB resource as follows:
===================================================
[oracle@rac1-12c ~]$ . oraenv
ORACLE_SID = [contdb2] ? contdb
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1-12c ~]$
[oracle@rac1-12c ~]$
[oracle@rac1-12c ~]$ srvctl remove mgmtdb
Remove the database _mgmtdb? (y/[n]) y
[oracle@rac1-12c ~]$

[oracle@rac1-12c templates]$ ls
MGMTSeed_Database.ctl    MGMTSeed_Database.dfb  mgmtseed_pdb.xml  pdbseed.dfb
MGMTSeed_Database.dbc  mgmtseed_pdb.dfb       New_Database.dbt  pdbseed.xml
[oracle@rac1-12c templates]$ pwd
/u01/app/12.1.0.2/grid/assistants/dbca/templates
[oracle@rac1-12c templates]$
[oracle@rac1-12c templates]$ cd ../../..
[oracle@rac1-12c grid]$ cd bin/

Create the MGMTDB in silent mode using the templates
====================================================
[oracle@rac1-12c bin]$ ./dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true
-templateName MGMTSeed_Database.dbc 
-gdbName _mgmtdb -storageType ASM -diskGroupName +DATA 
-datafileJarLocation /u01/app/12.1.0.2/grid/assistants/dbca/templates 
-characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck

Registering database with Oracle Grid Infrastructure
5% complete
Copying database files
7% complete
9% complete
16% complete
23% complete
30% complete
37% complete
41% complete
Creating and starting Oracle instance
43% complete
48% complete
49% complete
50% complete
55% complete
60% complete
61% complete
64% complete
Completing Database Creation
68% complete
79% complete
89% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/_mgmtdb/_mgmtdb1.log" for further details.
[oracle@rac1-12c bin]$

Check the log File:
=====================
[oracle@rac1-12c ~]$ cat /u01/app/oracle/cfgtoollogs/dbca/_mgmtdb/_mgmtdb1.log

+DATA has enough space. Required space is 1566 MB , available space is 55751 MB.
File Validations Successful.

Validation of server pool succeeded.
Registering database with Oracle Grid Infrastructure
DBCA_PROGRESS : 5%
Copying database files
DBCA_PROGRESS : 7%
DBCA_PROGRESS : 9%
DBCA_PROGRESS : 16%
DBCA_PROGRESS : 23%
DBCA_PROGRESS : 30%
DBCA_PROGRESS : 37%
DBCA_PROGRESS : 41%
Creating and starting Oracle instance
DBCA_PROGRESS : 43%
DBCA_PROGRESS : 48%
DBCA_PROGRESS : 49%
DBCA_PROGRESS : 50%
DBCA_PROGRESS : 55%
DBCA_PROGRESS : 60%
DBCA_PROGRESS : 61%
DBCA_PROGRESS : 64%
Completing Database Creation
DBCA_PROGRESS : 68%
DBCA_PROGRESS : 79%
DBCA_PROGRESS : 89%
DBCA_PROGRESS : 100%
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/_mgmtdb.
Database Information:
Global Database Name:_mgmtdb
System Identifier(SID):-MGMTDB
[oracle@rac1-12c ~]$
[oracle@rac1-12c bin]$ srvctl status MGMTDB
Database is enabled
Instance -MGMTDB is running on node rac1-12c
[oracle@rac1-12c bin]$

Check the MGMTDB instance
==========================
[oracle@rac1-12c bin]$ ps -ef | grep pmon
oracle   10415     1  0 07:49 ?        00:00:00 asm_pmon_+ASM1
oracle   23026     1  0 08:06 ?        00:00:00 mdb_pmon_-MGMTDB
oracle   26089 18664  0 08:14 pts/1    00:00:00 grep pmon
[oracle@rac1-12c bin]$

[oracle@rac1-12c ~]$ su - root
Password:
[root@rac1-12c ~]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/oracle

[root@rac1-12c ~]# cd /u01/app/12.1.0.2/grid/bin/
[root@rac1-12c bin]# crsctl modify res ora.crf -attr ENABLED=1 -init

[root@rac1-12c bin]# crsctl start res ora.crf -init
CRS-2672: Attempting to start 'ora.crf' on 'rac1-12c'
CRS-2676: Start of 'ora.crf' on 'rac1-12c' succeeded
[root@rac1-12c bin]#

[root@rac2-12c ~]# crsctl modify res ora.crf -attr ENABLED=1 -init
[root@rac2-12c ~]# crsctl start res ora.crf -init
CRS-2672: Attempting to start 'ora.crf' on 'rac2-12c'
CRS-2676: Start of 'ora.crf' on 'rac2-12c' succeeded
[root@rac2-12c ~]#


Check the GI version 
=====================
[root@rac1-12c bin]# crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [12.1.0.2.0]

[root@rac1-12c bin]# crsctl query crs releaseversion
Oracle High Availability Services release version on the local node is [12.1.0.2.0]
[root@rac1-12c bin]#
[root@rac1-12c bin]# exit
logout

[oracle@rac1-12c ~]$ . oraenv
ORACLE_SID = [contdb] ? contdb
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1-12c ~]$ ps -ef | grep pmon
oracle   10415     1  0 07:49 ?        00:00:00 asm_pmon_+ASM1
oracle   23026     1  0 08:06 ?        00:00:00 mdb_pmon_-MGMTDB
oracle   27904 18664  0 08:19 pts/1    00:00:00 grep pmon

[oracle@rac1-12c ~]$ srvctl status database -d contdb
Instance contdb1 is not running on node rac1-12c
Instance contdb2 is not running on node rac2-12c
[oracle@rac1-12c ~]$

[oracle@rac1-12c ~]$ srvctl start database -d contdb

[oracle@rac1-12c ~]$ srvctl status database -d contdb
Instance contdb1 is running on node rac1-12c
Instance contdb2 is running on node rac2-12c
[oracle@rac1-12c ~]$

[oracle@rac2-12c ~]$ . oraenv
ORACLE_SID = [primdb2] ? contdb
The Oracle base remains unchanged with value /u01/app/oracle

[oracle@rac2-12c ~]$
[oracle@rac2-12c ~]$ srvctl status database -d contdb
Instance contdb1 is running on node rac1-12c
Instance contdb2 is running on node rac2-12c
[oracle@rac2-12c ~]$

[oracle@rac2-12c ~]$ ps -ef | grep pmon
oracle     547 25673  0 08:56 pts/1    00:00:00 grep pmon
oracle    5059     1  0 07:50 ?        00:00:00 asm_pmon_+ASM2
oracle   21595     1  0 08:20 ?        00:00:00 ora_pmon_contdb2
[oracle@rac2-12c ~]$

2 comments:

  1. Thanks for sharing nice information, Hope you will share many more articles like this so that it will be helpful for many of us. Oracle Financials Training in Ameerpet

    ReplyDelete