Srvctl命令详解(10g)(一)

2015-07-24 09:18:33 · 作者: · 浏览: 0

Srvctl命令

Srvctl命令式RAC维护中最常用的命令也是最复杂的命令。这个工具用来维护一下几种资源:Database,Instance,ASM,Service,Listener和Node Application,node Application又包括GSD,ONS,VIP。

Srvctl命令的用法:

[root@felix2 bin]# ./srvctl -help

Usage: srvctl []

command:enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config

objects:database|instance|service|nodeapps|asm|listener

For detailed help on each command and object andits options use:

srvctl -h

[root@felix2 bin]#

[root@felix1 bin]# ./srvctl -h

Usage: srvctl [-V]

Usage: srvctl add database -d -o [-m ] [-p ] [-A/netmask] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY}][-s ] [-n ] [-y {AUTOMATIC | MANUAL}]

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] [-s] [-l]

Usage: srvctl config asm -n

Usage: srvctl config listener -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 ] [-y {AUTOMATIC | MANUAL}]

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 service -d -s -n -i [-a ][-f]

Usage: srvctl modify asm -n -i [-o ] [-p ]

Usage: srvctl modify nodeapps -n [-o ] [-A ]

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]

Usage: srvctl start instance -d -i"" [-o ]

Usage: srvctl start service -d [-s"" [-i ]] [-o]

Usage: srvctl start nodeapps -n

Usage: srvctl start asm -n [-i] [-o ]

Usage: srvctl start listener -n [-l ]

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]

Usage: srvctl stop instance -d -i"" [-o ]

Usage: srvctl stop service -d [-s"" [-i ]] [-f]

Usage: srvctl stop nodeapps -n [-r]

Usage: srvctl stop asm -n [-i] [-o ]

Usage: srvctl stop listener -n [-l ]

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 ""

使用config查看配置

1.查看数据库配置。

[root@felix2 bin]# ./srvctl config database

felix

[root@felix