Reconfigure 12.1.0.2 HAS stack running 11.2.0.4 database

Overview

  • Tested Version OHAS : 12.0.1.0.2 / RDBMS 11.2.0.4
  • This article is related to :  

Check resource and ASM related parameters

Trace file location 12.1.0.2 
/u01/app/grid/diag/crs/orars12/crs/trace

[root@orars12 Desktop]# crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.DATA.dg                    ONLINE     ONLINE          orars12      STABLE   
ora.LISTENER.lsnr              ONLINE     ONLINE          orars12      STABLE   
ora.asm                        ONLINE     ONLINE          orars12      Started,STABLE   
ora.ons                        OFFLINE    OFFLINE         orars12      STABLE   
*****  Cluster Resources: *****
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.cssd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.diskmon                    1   OFFLINE      OFFLINE      -               STABLE  
ora.evmd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.ors4.db                    1   ONLINE       ONLINE       orars12         Open,STABLE  

[oracle@orars12 ~]$  asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576     10236     8702                0            8702              0             N  DATA/

Create an ASM Spfile 
[oracle@orars12 ~]$ asmcmd spget
+DATA/ASM/ASMPARAMETERFILE/registry.253.857645183
SQL> create pfile='/tmp/init+ASM.ora' from spfile='+DATA/ASM/ASMPARAMETERFILE/registry.253.857645183';
File created.

SQL> !cat /tmp/init+ASM.ora
+ASM.__oracle_base='/u01/app/grid'#ORACLE_BASE set from in memory value
*.asm_diskgroups='DATA'#Manual Mount
*.asm_diskstring='/dev/asm*'
*.asm_power_limit=1
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'

Deconfigure and Reconfigure HAS stack

Stop HAS stack as grid user
[oracle@orars12 ~]$ crsctl stop has
[oracle@orars12 ~]$ crsctl check has
CRS-4639: Could not contact Oracle High Availability Services

As root user : Deconfigure HAS stack 
[root@orars12 Desktop]# env | grep GRID_HOME
GRID_HOME=/u01/app/1202/grid
[root@orars12 Desktop]# $GRID_HOME/crs/install/roothas.pl -deconfig -force
Using configuration parameter file: /u01/app/1202/grid/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
2014/09/08 16:30:05 CLSRSC-337: Successfully deconfigured Oracle Restart stack

As root user : Add back the OHAS configuration $GRID_HOME/crs/install/roothas.pl
Using configuration parameter file: /u01/app/1202/grid/crs/install/crsconfig_params
LOCAL ADD MODE 
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE 
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node orars12 successfully pinned.
2014/09/08 16:32:46 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.conf'
orars12     2014/09/08 16:34:09     /u01/app/1202/grid/cdata/orars12/backup_20140908_163409.olr     0   
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'orars12'
CRS-2673: Attempting to stop 'ora.evmd' on 'orars12'
CRS-2677: Stop of 'ora.evmd' on 'orars12' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'orars12' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2014/09/08 16:36:12 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

Resource status after reconfigure HAS
[oracle@orars12 ~]$ crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.ons                        OFFLINE    OFFLINE         orars12      STABLE   
*****  Cluster Resources: *****
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.cssd                       1   OFFLINE      OFFLINE      -               STABLE  
ora.diskmon                    1   OFFLINE      OFFLINE      -               STABLE  
ora.evmd                       1   ONLINE       ONLINE       orars12         STABLE 

Note :
   Don't use "AUTO_START=1" use AUTO_START=always instead ! 

[oracle@orars12 ~]$ crsctl modify resource "ora.cssd" -attr "AUTO_START=1"
CRS-4995:  The command 'Modify  resource' is invalid in crsctl. Use srvctl for this command.
[oracle@orars12 ~]$ crsctl status resource "ora.cssd" -f | grep AUTO_START
AUTO_START=never
[oracle@orars12 ~]$ crsctl modify resource ora.cssd -init -attr "AUTO_START=always"

Add back ASM resource and start HAS stack

[oracle@orars12 ~]$ srvctl add asm -p '+DATA/ASM/ASMPARAMETERFILE/registry.253.857645183'

[oracle@orars12 ~]$ crsctl stop has
[oracle@orars12 ~]$ crsctl start has
CRS-4123: Oracle High Availability Services has been started.
[oracle@orars12 ~]$  crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.asm                        OFFLINE    OFFLINE         orars12      Instance Shutdown,ST  ABLE
ora.ons                        OFFLINE    OFFLINE         orars12      STABLE   
*****  Cluster Resources: *****
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.cssd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.diskmon                    1   OFFLINE      OFFLINE      -               STABLE  
ora.evmd                       1   ONLINE       ONLINE       orars12         STABLE  

Start ASM instance and verify that DG +DATA get mounted successfully 
Either create and ASM SPILE or better just reuse SPFILE we have created earlier
[oracle@orars12 ~]$ cat /tmp/init+ASM.ora
+ASM.__oracle_base='/u01/app/grid'#ORACLE_BASE set from in memory value
*.asm_diskgroups='DATA'#Manual Mount
*.asm_diskstring='/dev/asm*'
*.asm_power_limit=1
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'

SQL> startup pfile=/tmp/init+ASM.ora
ASM instance started

Total System Global Area 1140850688 bytes
Fixed Size            2933400 bytes
Variable Size         1112751464 bytes
ASM Cache           25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled

[oracle@orars12 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576     10236     8702                0            8702              0             N  DATA/

Check HAS stack
[oracle@orars12 ~]$ crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.DATA.dg                    ONLINE     ONLINE          orars12      STABLE   
ora.asm                        ONLINE     ONLINE          orars12      STABLE   
ora.ons                        OFFLINE    OFFLINE         orars12      STABLE   
*****  Cluster Resources: *****
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.cssd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.diskmon                    1   OFFLINE      OFFLINE      -               STABLE  
ora.evmd                       1   ONLINE       ONLINE       orars12         STABLE 

Note: During the ASM instance startup, the ASM diskgroups (specified in the ASM_DISKGROUP parameter) are/were mounted and also those diskgroups 
are automatically populated as resources in the SIHA/OHAS/Restart stack.

==> SRVCTL Command Reference for Oracle Restart

<< There is no srvctl add command for Oracle ASM disk groups. Disk groups are automatically added to the Oracle Restart configuration when they 
   are first mounted. If you remove a disk group from the Oracle Restart configuration and later want to add it back, connect to the Oracle ASM instance 
   with SQL*Plus and use an ALTER DISKGROUP ... MOUNT command.

Restart CRS stack
[oracle@orars12 ~]$  crsctl stop has
[oracle@orars12 ~]$  crsctl start has

[oracle@orars12 ~]$ crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.DATA.dg                    ONLINE     ONLINE          orars12      STABLE   
ora.asm                        ONLINE     ONLINE          orars12      Started,STABLE

Add the database and GRID listener  resource

ASMCMD> find --type  PARAMETERFILE  +data *
+data/ORS4/PARAMETERFILE/spfile.266.857557289
+data/ORS4/spfileORS4.ora

[oracle@orars12 ~]$ env | grep ORA
ORACLE_HOME=/u01/app/oracle/product/11204/ors
Use 11.2.0.4 srvctl :
[oracle@orars12 ~]$ srvctl add database -d ORS4 -n ORS4 -o /u01/app/oracle/product/11204/ors -p +data/ORS4/spfileORS4.ora
                 -s OPEN -y AUTOMATIC -a "DATA" -t IMMEDIATE

[oracle@orars12 ~]$  srvctl config database -d ORS4
Database unique name: ORS4
Database name: ORS4
Oracle home: /u01/app/oracle/product/11204/ors
Oracle user: oracle
Spfile: +data/ORS4/spfileORS4.ora
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Database instance: ORS4
Disk Groups: DATA
Services:

[oracle@orars12 ~]$ crs
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.ors4.db                    1   OFFLINE      OFFLINE      -               STABLE  
--> DB resource still in OFFLINE mode 

[oracle@orars12 ~]$ sqlplus / as sysdba
SQL> startup

[oracle@orars12 ~]$ crs
ora.ors4.db                    1   ONLINE       ONLINE       orars12         Open,STABLE 

Add back GRID  listener and start the listener a fist time 
Use 12.1.0.2 srvctl :
[oracle@orars12 ~]$ srvctl add listener -p TCP:1521 -l LISTENER -o $GRID_HOME
[oracle@orars12 ~]$ srvctl start listener
[oracle@orars12 ~]$ crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.LISTENER.lsnr              ONLINE     ONLINE          orars12      STABLE   

Restart crs and check that all resource get started
[oracle@orars12 ~]$ crsctl stop has
[oracle@orars12 ~]$ crsctl start has
[oracle@orars12 ~]$ crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.DATA.dg                    ONLINE     ONLINE          orars12      STABLE   
ora.LISTENER.lsnr              ONLINE     ONLINE          orars12      STABLE   
ora.asm                        ONLINE     ONLINE          orars12      Started,STABLE   
ora.ons                        OFFLINE    OFFLINE         orars12      STABLE   
*****  Cluster Resources: *****
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.cssd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.diskmon                    1   OFFLINE      OFFLINE      -               STABLE  
ora.evmd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.ors4.db                    1   ONLINE       ONLINE       orars12         Open,STABLE

Reference

2 thoughts on “Reconfigure 12.1.0.2 HAS stack running 11.2.0.4 database”

  1. [oracle@orars12 ~]$ crsctl modify resource ora.cssd -init -attr “AUTO_START=always”

    What does -init mean, it is not mentioned in the MOS doc, instead there they say use: -unsupported?

    crsctl help output is:
    /app/flolso/oracle/grid/19.3/bin/crsctl modify resource –help
    Usage:
    crsctl modify resource -attr “[,…]” [-f] [-delete] [-i] [-group ] [-env “env1=val1,env2=val2,…”]
    : {= | @=}
    : {@SERVERNAME()[@DEGREEID()] |
    @CARDINALITYID()[@DEGREEID()] }
    where
    resName Modify named resource
    attrName Attribute name
    value Attribute value
    server Server name
    cid Resource cardinality ID
    did Resource degree ID
    -f Force option
    -delete Delete named attribute
    -i Fail if request cannot be processed immediately
    -env Override environment values for this command
    resourceGroupName Resource group name

Leave a Reply

Your email address will not be published. Required fields are marked *