STOP & START THE SINGLE NODE RAC DATABASE
Posted by Mir Sayeed Hassan on May 20th, 2018
STOP & START THE SINGLE NODE RAC DATABASE
===========================
STOP THE SINGLE NODE RAC DATABASE
===========================
Check the status of the database.
[oracle@test-rac2 ~]$ !sq SQL> select status from v$instance; STATUS ------------ OPEN
Or
[oracle@test-rac2 ~]$ srvctl status database -d rac Instance rac1 is running on node test-rac1 Instance rac2 is running on node test-rac2
Stop the database by using the srvctl
Syntax: srvctl stop instance –d db_name –I instance_name
Example:
[oracle@test-rac2 ~]$ srvctl stop instance -d rac -i rac2
[oracle@test-rac2 ~]$ srvctl status database -d rac Instance rac1 is running on node test-rac1 Instance rac2 is not running on node test-rac2
Check the status of the CRS
[oracle@test-rac2 bin]$ ./crsctl check cluster -all ************************************************************** test-rac1: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** test-rac2: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online
Stop the CRS (In this it will stop the listener & nodeapps)
[root@test-rac2 bin]# cd /u01/app/11.2.0/grid/bin
[root@test-rac2 bin]# ./crsctl stop crs CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'test-rac2' CRS-2673: Attempting to stop 'ora.crsd' on 'test-rac2' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'test-rac2' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'test-rac2' CRS-2673: Attempting to stop 'ora.oc4j' on 'test-rac2' CRS-2673: Attempting to stop 'ora.DATA.dg' on 'test-rac2' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'test-rac2' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'test-rac2' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'test-rac2' CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.scan3.vip' on 'test-rac2' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.test-rac2.vip' on 'test-rac2' CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.scan1.vip' on 'test-rac2' CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.scan2.vip' on 'test-rac2' CRS-2677: Stop of 'ora.scan3.vip' on 'test-rac2' succeeded CRS-2672: Attempting to start 'ora.scan3.vip' on 'test-rac1' CRS-2677: Stop of 'ora.test-rac2.vip' on 'test-rac2' succeeded CRS-2672: Attempting to start 'ora.test-rac2.vip' on 'test-rac1' CRS-2677: Stop of 'ora.scan1.vip' on 'test-rac2' succeeded CRS-2672: Attempting to start 'ora.scan1.vip' on 'test-rac1' CRS-2677: Stop of 'ora.scan2.vip' on 'test-rac2' succeeded CRS-2672: Attempting to start 'ora.scan2.vip' on 'test-rac1' CRS-2676: Start of 'ora.test-rac2.vip' on 'test-rac1' succeeded CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'test-rac1' CRS-2676: Start of 'ora.scan1.vip' on 'test-rac1' succeeded CRS-2676: Start of 'ora.scan3.vip' on 'test-rac1' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'test-rac1' CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'test-rac1' CRS-2676: Start of 'ora.scan2.vip' on 'test-rac1' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'test-rac1' CRS-2677: Stop of 'ora.DATA.dg' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'test-rac2' CRS-2677: Stop of 'ora.asm' on 'test-rac2' succeeded CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'test-rac1' succeeded CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'test-rac1' succeeded CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'test-rac1' succeeded CRS-2676: Start of 'ora.LISTENER.lsnr' on 'test-rac1' succeeded CRS-2677: Stop of 'ora.oc4j' on 'test-rac2' succeeded CRS-2672: Attempting to start 'ora.oc4j' on 'test-rac1' CRS-2674: Start of 'ora.oc4j' on 'test-rac1' failed CRS-2679: Attempting to clean 'ora.oc4j' on 'test-rac1' CRS-2681: Clean of 'ora.oc4j' on 'test-rac1' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'test-rac2' CRS-2677: Stop of 'ora.ons' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'test-rac2' CRS-2677: Stop of 'ora.net1.network' on 'test-rac2' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'test-rac2' has completed CRS-2677: Stop of 'ora.crsd' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'test-rac2' CRS-2673: Attempting to stop 'ora.evmd' on 'test-rac2' CRS-2673: Attempting to stop 'ora.asm' on 'test-rac2' CRS-2673: Attempting to stop 'ora.mdnsd' on 'test-rac2' CRS-2677: Stop of 'ora.evmd' on 'test-rac2' succeeded CRS-2677: Stop of 'ora.mdnsd' on 'test-rac2' succeeded CRS-2677: Stop of 'ora.ctssd' on 'test-rac2' succeeded CRS-2677: Stop of 'ora.asm' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'test-rac2' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'test-rac2' CRS-2677: Stop of 'ora.cssd' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.crf' on 'test-rac2' CRS-2677: Stop of 'ora.crf' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'test-rac2' CRS-2677: Stop of 'ora.gipcd' on 'test-rac2' succeeded CRS-2673: Attempting to stop 'ora.gpnpd' on 'test-rac2' CRS-2677: Stop of 'ora.gpnpd' on 'test-rac2' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'test-rac2' has completed CRS-4133: Oracle High Availability Services has been stopped.
Verify the CRS Stop status
[root@test-rac2 bin]# ./crsctl check cluster -all CRS-4639: Could not contact Oracle High Availability Services CRS-4000: Command Check failed, or completed with errors.
Verify the database of stopped node:
[oracle@test-rac2 ~]$ !sq sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Sun May 20 15:13:04 2018 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL>
=========Hence successfully stop the Single Node in RAC ENV========
============================
START THE SINGLE NODE RAC DATABASE
============================
Start the CRS (In this case the listener & nodeapps will start automatically)
[root@test-rac2 bin]# cd /u01/app/11.2.0/grid/bin
[root@test-rac2 bin]# ./crsctl start crs CRS-4123: Oracle High Availability Services has been started.
[root@test-rac2 bin]# ./crsctl check cluster -all ************************************************************** test-rac1: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** test-rac2: CRS-4535: Cannot communicate with Cluster Ready Services CRS-4529: Cluster Synchronization Services is online CRS-4534: Cannot communicate with Event Manager
In the above scenario, wait for few minutes & check, therefore its start automatically as shown below
[root@test-rac2 bin]# ./crsctl check cluster -all ************************************************************** test-rac1: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** test-rac2: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online **************************************************************
In case if it’s not starts issue the below command:
[root@test-rac2 bin]# cd /u01/app/11.2.0/grid/bin
[root@test-rac2 bin]# ./crsctl start res ora.crsd -init
Check the status of the database, still the database is not up
[oracle@test-rac2 ~]$ srvctl status database -d rac Instance rac1 is running on node test-rac1 Instance rac2 is not running on node test-rac2
Start the instance of the node
[oracle@test-rac2 ~]$ srvctl start instance -d rac -i rac2
Verify the database:
[oracle@test-rac2 ~]$ srvctl status database -d rac Instance rac1 is running on node test-rac1 Instance rac2 is running on node test-rac2
Or
[oracle@test-rac2 ~]$ !sq sqlplus / as sysdba SQL> select status from v$instance; STATUS ------- OPEN
Verify the listener:
[oracle@test-rac2 ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-MAY-2018 15:24:27 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 20-MAY-2018 15:15:56 Uptime 0 days 0 hr. 8 min. 31 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/test-rac2/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.20.0.91)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.20.0.93)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "rac.localdomain" has 1 instance(s). Instance "rac2", status READY, has 1 handler(s) for this service... Service "racXDB.localdomain" has 1 instance(s). Instance "rac2", status READY, has 1 handler(s) for this service...