Thursday, October 3, 2013

Useful Oracle 11gR2 SRVCTL commands

Check database status across cluster nodes:

[oracle@rac1 bin]$ srvctl status database -d RAC
Instance RAC1 is running on node rac1
Instance RAC2 is running on node rac2

Stop cluster database:

[oracle@rac1 bin]$ srvctl stop database -d RAC
[oracle@rac1 bin]$ srvctl status database -d RAC
Instance RAC1 is not running on node rac1
Instance RAC2 is not running on node rac2
[oracle@rac1 bin]$

Start cluster database:

[oracle@rac1 bin]$ srvctl start database -d RAC
[oracle@rac1 bin]$ srvctl status database -d RAC
Instance RAC1 is running on node rac1
Instance RAC2 is running on node rac2

Stop an instance across cluster nodes:

[oracle@rac1 bin]$ srvctl stop instance -i RAC1 -d RAC
[oracle@rac1 bin]$ srvctl status database -d RAC
Instance RAC1 is not running on node rac1
Instance RAC2 is running on node rac2
[oracle@rac1 bin]$

Start an instance across cluster nodes:

[oracle@rac1 bin]$ srvctl start instance -i RAC1 -d RAC
[oracle@rac1 bin]$ srvctl status database -d RAC
Instance RAC1 is running on node rac1
Instance RAC2 is running on node rac2
[oracle@rac1 bin]$

Check status of specific Instance across cluster nodes:

[oracle@rac1 bin]$  srvctl status instance -d RAC -i RAC1
Instance RAC1 is running on node rac1
[oracle@rac1 bin]$

Check status of services on all nodes:

[oracle@rac1 bin]$ srvctl status nodeapps
VIP rac1-vip is enabled
VIP rac1-vip is running on node: rac1
VIP rac2-vip is enabled
VIP rac2-vip is running on node: rac2
Network is enabled
Network is running on node: rac1
Network is running on node: rac2
GSD is disabled
GSD is not running on node: rac1
GSD is not running on node: rac2
ONS is enabled
ONS daemon is running on node: rac1
ONS daemon is running on node: rac2
[oracle@rac1 bin]$

Check Status of the listener on a Node:

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

Stop the listener on a Node:

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

Start the listener on a Node:

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


Hope this will help you... :)

Best Regards,

No comments:

Post a Comment

Some Most Popular Articles