Showing posts with label Server Control Utility (SRVCTL). Show all posts
Showing posts with label Server Control Utility (SRVCTL). Show all posts

Friday, April 27, 2012

Server Control Utility (SRVCTL)


Server Control Utility (SRVCTL) 

Login as oracle user to Linux

oracle@rac1$

Start and Stop database:

srvctl stop database -d racdb
srvctl start database -d racdb

Start and Stop instance

srvctl stop instance -d racdb -i racdb2
srvctl start instance -d racdb1 -i racdb2

start and Stop ASM

srvctl stop asm -n rac2
srvctl start asm -n rac2

Start and Stop Listener

srvctl stop listener -n rac2
srvctl start listener -n rac2

Start and Stop nodeapps

srvctl stop nodeapps -n rac2
srvctl start nodeapps -n rac2

How to add service using srvctl

srvctl add service -s TEST1 -d racdb -r racdb1 -a racdb2 -r preferred -a available

srvctl start service -s TEST1 -d racdb

this step is to add TNS entry for the service created through srvctl

srvctl config database -d racdb -t

How to modiy the service

srvctl config service -s TEST1 -d racdb

Make racdb2 also as preferred for service TEST1

srvctl config service -s TEST1 -d racdb -i racdb2 -r
srvctl config service -s TEST1 -d racdb

$srvctl stop/start/disable service -s TEST1 -d racdb -i racdb1

Changing between manual and auto

srvctl config database -d racdb -a
srvctl modify database -d racdb -y MANUAL