Srvctl

From Oracle FAQ
Jump to: navigation, search

SRVCTL (Server Control) is a command line utility that can be used to control RAC resources (databases, instances services, etc.) from a single node.

[edit] Starting and stopping resources

Stops all RAC instances:

$ srvctl stop database –d myracdb 

Stops Listener, VIP, GSD, ONS:

$ srvctl stop nodeapps –n racnode1 

Starts ASM on racnode1 and all required dependencies:

$ srvctl start asm –n racnode1

Starts one instance and all required dependencies:

$ srvctl start instance –d myracdb –i mydb1

[edit] Define a service

Create a new service:

srvctl add service -d mydb -s orderentry -r "mydb1,mydb2" -a "mydb1,mydb2" -P BASIC

Check its status:

$ > srvctl status service -d mydb -s "orderentry"

Service orderentry is not running.

Start the service:

$ > srvctl start service -d mydb -s "orderentry"

Test if we can connect:

sqlplus scott/tiger@//node1/orderentry

[edit] Also see