srvctlSD.txt 2005-03-26 Bikle ----------------- The file contains a simple screen dump of some srvctl commands. oracle@v490rep5 $ bash bash-2.05$ srvctl -h Usage: srvctl [-V] Usage: srvctl add database -d -o [-m ] [-p ] [-A /netmask] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY}] [-s ] [-n ] Usage: srvctl add instance -d -i -n Usage: srvctl add service -d -s -r "" [-a ""] [-P ] Usage: srvctl add service -d -s -u {-r "" | -a ""} Usage: srvctl add nodeapps -n -o -A /netmask[/if1[|if2|...]] Usage: srvctl add asm -n -i -o [-p ] Usage: srvctl config database Usage: srvctl config database -d [-a] [-t] Usage: srvctl config service -d [-s ] [-a] [-S ] Usage: srvctl config nodeapps -n [-a] [-g] [-o] [-s] [-l] Usage: srvctl config asm -n Usage: srvctl disable database -d Usage: srvctl disable instance -d -i "" Usage: srvctl disable service -d -s "" [-i ] Usage: srvctl disable asm -n [-i ] Usage: srvctl enable database -d Usage: srvctl enable instance -d -i "" Usage: srvctl enable service -d -s "" [-i ] Usage: srvctl enable asm -n [-i ] Usage: srvctl getenv database -d [-t ""] Usage: srvctl getenv instance -d -i [-t ""] Usage: srvctl getenv service -d -s [-t ""] Usage: srvctl getenv nodeapps -n [-t ""] Usage: srvctl modify database -d [-n ] [-m ] [-p ] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY}] [-s ] Usage: srvctl modify instance -d -i -n Usage: srvctl modify instance -d -i {-s | -r} Usage: srvctl modify service -d -s -i -t [-f] Usage: srvctl modify service -d -s -i -r [-f] Usage: srvctl modify asm -n -i -p Usage: srvctl relocate service -d -s -i -t [-f] Usage: srvctl remove database -d [-f] Usage: srvctl remove instance -d -i [-f] Usage: srvctl remove service -d -s [-i ] [-f] Usage: srvctl remove nodeapps -n "" [-f] Usage: srvctl remove asm -n [-i ] [-f] Usage: srvctl setenv database -d {-t =[,=,...] | -T =} Usage: srvctl setenv instance -d [-i ] {-t "=[,=,...]" | -T "="} Usage: srvctl setenv service -d [-s ] {-t "=[,=,...]" | -T "="} Usage: srvctl setenv nodeapps -n {-t "=[,=,...]" | -T "="} Usage: srvctl start database -d [-o ] [-c | -q] Usage: srvctl start instance -d -i "" [-o ] [-c | -q] Usage: srvctl start service -d [-s "" [-i ]] [-o ] [-c | -q] Usage: srvctl start nodeapps -n Usage: srvctl start asm -n [-i ] [-o ] Usage: srvctl status database -d [-f] [-v] [-S ] Usage: srvctl status instance -d -i "" [-f] [-v] [-S ] Usage: srvctl status service -d -s "" [-f] [-v] [-S ] Usage: srvctl status nodeapps -n Usage: srvctl status asm -n Usage: srvctl stop database -d [-o ] [-c | -q] Usage: srvctl stop instance -d -i "" [-o ] [-c | -q] Usage: srvctl stop service -d [-s "" [-i ]] [-c | -q] [-f] Usage: srvctl stop nodeapps -n Usage: srvctl stop asm -n [-i ] [-o ] Usage: srvctl unsetenv database -d -t "" Usage: srvctl unsetenv instance -d [-i ] -t "" Usage: srvctl unsetenv service -d [-s ] -t "" Usage: srvctl unsetenv nodeapps -n -t "" bash-2.05$ When I first saw the above syntax, I asked, "Why do I need to specify the name of the database with the -d option?" Answer: A cluster may house more than one RAC database; srvctl is an interface to the cluster. More screen dumps: bash-2.05$ srvctl status database -d prov Instance prov1 is running on node v490rep5 Instance prov2 is running on node v490rep6 Instance prov3 is running on node v490rep7 bash-2.05$ Notice that it is context sensitive; below I try to specify an instance when I'm trying to check the status of the db: bash-2.05$ srvctl status database -d prov -i prov2 PRKO-2002 : Invalid command line option: -i If I want to check the status of an instance, I need to specify which db it is in: bash-2.05$ srvctl status instance -d prov -i prov2 Instance prov2 is running on node v490rep6 bash-2.05$ Demo of bouncing an instance. Notice I can do it from any node in the cluster: bash-2.05$ hostname v490rep5 bash-2.05$ srvctl stop instance -d prov -i prov2 bash-2.05$ ssh v490rep7 Last login: Sat Mar 26 15:22:43 2005 from v490rep5 Sun Microsystems Inc. SunOS 5.9 Generic May 2002 (autopatch) oracle@v490rep7 $ oracle@v490rep7 $ srvctl start instance -d prov -i prov2 oracle@v490rep7 $ srvctl status database -d prov Instance prov1 is running on node v490rep5 Instance prov2 is running on node v490rep6 Instance prov3 is running on node v490rep7 oracle@v490rep7 $ If I want to query the status of a service, I need to know the name of the service. I cannot use srvctl to obtain a list of services: oracle@v490rep7 $ srvctl status service -d prov PRKO-2001 : Invalid command line syntax oracle@v490rep7 $ srvctl status service -d prov -s oltp Service oltp is running on instance(s) prov1, prov3 oracle@v490rep7 $