NaturalOracle DataGaurd tutorial Series Coming Soon!! Natural
For Any queries, please mail us at support@funoracleapps.com

Stopping and Starting RAC Services

No comments



STOP ORACLE RAC

1. emctl stop dbconsole

2. srvctl stop listener -n racnode1

3. srvctl stop database -d RACDB

4. srvctl stop asm -n racnode1 -f

5. srvctl stop asm -n racnode2 -f

6. srvctl stop nodeapps -n racnode1 -f

7. crsctl stop crs

 

START ORACLE RAC

1. crsctl start crs

2. crsctl start res ora.crsd -init

3. srvctl start nodeapps -n racnode1

4. srvctl start nodeapps -n racnode2

5. srvctl start asm -n racnode1

6. srvctl start asm -n racnode2

7. srvctl start database -d RACDB

8. srvctl start listener -n racnode1

9. emctl start dbconsole



Stop Oracle Real Application Clusters 

1. Stop Oracle Home LISTENER

[grid@racnode1 bin]$ srvctl stop listener -n racnode1

[grid@racnode1 bin]$ srvctl status listener -n racnode1
Listener LISTENER is enabled on node(s): racnode1
Listener LISTENER is not running on node(s): racnode1


2. Shutdown RAC Database Instances on all nodes

Syntax: srvctl stop database -d {databasename}

[oracle@racnode2 ~]$ srvctl status database -d racdb
Instance racdb1 is running on node racnode1
Instance racdb2 is running on node racnode2
[oracle@racnode2 ~]$ srvctl stop database -d racdb

[oracle@racnode2 ~]$ srvctl status database -d racdb
Instance racdb1 is not running on node racnode1
Instance racdb2 is not running on node racnode2

Execute one command from any one of the server having database and it will stop all database instances on all servers. 


3. Shutdown All ASM instances from all nodes

Syntax: srvctl stop asm -n {node}

[grid@racnode2 oracle]# srvctl stop asm -n racnode1 -f

[grid@racnode2 oracle]# srvctl stop asm -n racnode2 -f

Check Status

[grid@racnode2 oracle]# srvctl status asm -n racnode1
ASM is not running on racnode1

[grid@racnode2 oracle]# srvctl status asm -n racnode2
ASM is not running on racnode2

Sometimes, we may face some issues in stopping ASM instance, In that case use "-f" option to forcefully shutdown ASM instances.


4. Shutdown Node applications running on nodes

[grid@racnode2 oracle]#  srvctl stop nodeapps -n racnode1 -f

[grid@racnode2 oracle]# srvctl status nodeapps -n racnode1 
VIP racnode1-vip is enabled
VIP racnode1-vip is running on node: racnode1
Network is enabled
Network is running on node: racnode1
GSD is disabled
GSD is not running on node: racnode1
ONS is enabled
ONS daemon is running on node: racnode1

Repeat same command for all nodes one by one. If you face any issue in stopping node applications use "-f" as force option to stop applications.


5. Shut down the Oracle Clusterware or CRS In this command all CRS related process will be stopped. 
This  needs to be executed by "root" user on all database nodes.

[root@racnode1 bin]# crsctl check cluster -all

**************************************************************
racnode1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

*************************************************************
racnode2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

[root@racnode1 bin]# crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'racnode1'
CRS-2673: Attempting to stop 'ora.crsd' on 'racnode1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'racnode1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'racnode1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'racnode1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'racnode1'
CRS-2673: Attempting to stop 'ora.racnode2.vip' on 'racnode1'
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
CRS-2677: Stop of 'ora.cssd' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'racnode1'
CRS-2677: Stop of 'ora.gipcd' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'racnode1'
CRS-2677: Stop of 'ora.gpnpd' on 'racnode1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'racnode1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

[root@racnode1 bin]# crsctl check cluster -all

CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Check failed, or completed with errors.


------------------------------------------------------------------------------------------------------------------------

Start Oracle Real Application Clusters Database 



1. Start Oracle Clusterware or CRS: CRS starts automatically when you start or restart Server
This  needs to be executed by "root" user on all nodes.

[root@racnode1 bin]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started 
[root@racnode2 bin]# crsctl check cluster -all
**************************************************************
racnode1:
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

racnode2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

If we see "CRS-4639: Could not contact Oracle High Availability Services" or "CRS-4535: Cannot communicate with Cluster Ready Services" messages. Wait 5 minutes and then again check with "crsctl check cluster -all" command. This time Database administrator will get "CRS-4537: Cluster Ready Services is online". If still same issue DBA can start ora.crsd process to resolve this issue. Below is the command

[root@racnode1 bin]# crsctl start res ora.crsd -init

[root@racnode1 bin]# crsctl check cluster -all
**************************************************************
racnode1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

racnode2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

Now, Cluster is up and running. DBA can also use "ps -ef | grep d.bin" to check cluster status.


2. Start Node applications running on nodes

[grid@racnode1 bin]$ srvctl start nodeapps -n racnode1

[grid@racnode1 bin]$ srvctl status nodeapps -n racnode1
VIP racnode1-vip is enabled
VIP racnode1-vip is running on node: racnode1
Network is enabled
Network is running on node: racnode1
GSD is disabled
GSD is not running on node: racnode1
ONS is enabled
ONS daemon is running on node: racnode1

Execute this command for each node to start RAC Cluster database. 


3. Start All ASM instances from all nodes

[grid@racnode1 bin]$ srvctl start asm -n racnode1

[grid@racnode1 bin]$ srvctl status asm -n racnode1
ASM is running on racnode1

DBA has to start ASM instance on all database nodes.


4. Start RAC Database Instances on all nodes

[grid@racnode1 bin]$ srvctl start database -d racdb

[grid@racnode1 bin]$ srvctl status database -d racdb
Instance racdb1 is running on node racnode1
Instance racdb2 is running on node racnode2

Now database is up and running on both DB nodes.


5. Start Oracle Home LISTENER 

[grid@racnode1 bin]$ srvctl start listener -n racnode1

[grid@racnode1 bin]$ srvctl status listener -n racnode1
Listener LISTENER is enabled on node(s): racnode1
Listener LISTENER is running on node(s): racnode1

No comments :

Post a Comment