Command for adminstration for clusterware resource

网友投稿 434 2022-11-05


Command for adminstration for clusterware resource

In fact this article should be named 'Description of crsctl, srvctl, ocrcheck, olsnodes and oifconfig'.  I want to introduce all the description about these commands.

Srvctl and crsctl are used to manage clusterware resources.  The general rule is to use srvctl for whatever resource management you can.  Crsctl should only be used for things that you cannot do with srvctl (like start the cluster).  Both have a help feature to see the available syntax.

Note that the following only shows the available srvctl syntax.  For additional explanation on what these commands do, see the ​​Oracle Documentation​​ .

Srvctl syntax:

​​$ srvctl -h Usage: srvctl [-V] Usage: srvctl add database -d -o [-m ] [-p ] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY}] [-s ] [-t ] [-n ] [-y {AUTOMATIC | MANUAL}] [-g ""] [-x ] [-a ""] Usage: srvctl config database [-d [-a] ] Usage: srvctl start database -d [-o ] Usage: srvctl stop database -d [-o ] [-f] Usage: srvctl status database -d [-f] [-v] Usage: srvctl enable database -d [-n ] Usage: srvctl disable database -d [-n ] Usage: srvctl modify database -d [-n ] [-o ] [-u ] [-m ] [-p ] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY}] [-s ] [-t ] [-y {AUTOMATIC | MANUAL}] [-g "" [-x ]] [-a ""|-z] Usage: srvctl remove database -d [-f] [-y] Usage: srvctl getenv database -d [-t ""] Usage: srvctl setenv database -d {-t =[,=,...] | -T =} Usage: srvctl unsetenv database -d -t "" Usage: srvctl add instance -d -i -n [-f] Usage: srvctl start instance -d {-n [-i ] | -i } [-o ] Usage: srvctl stop instance -d {-n | -i }  [-o ] [-f] Usage: srvctl status instance -d {-n | -i } [-f] [-v] Usage: srvctl enable instance -d -i "" Usage: srvctl disable instance -d -i "" Usage: srvctl modify instance -d -i { -n | -z } Usage: srvctl remove instance -d [-i ] [-f] [-y] Usage: srvctl add service -d -s {-r "" [-a ""] [-P {BASIC | NONE | PRECONNECT}] | -g [-c {UNIFORM | SINGLETON}] } [-k   ] [-l [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]] [-y {AUTOMATIC | MANUAL}] [-q {TRUE|FALSE}] [-x {TRUE|FALSE}] [-j {SHORT|LONG}] [-B {NONE|SERVICE_TIME|THROUGHPUT}] [-e {NONE|SESSION|SELECT}] [-m {NONE|BASIC}] [-z ] [-w ] Usage: srvctl add service -d -s -u {-r "" | -a ""} Usage: srvctl config service -d [-s ] [-a] Usage: srvctl enable service -d -s "" [-i | -n ] Usage: srvctl disable service -d -s "" [-i | -n ] Usage: srvctl status service -d [-s ""] [-f] [-v] 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 service -d -s [-c {UNIFORM | SINGLETON}] [-P {BASIC|PRECONNECT|NONE}] [-l [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]] [-y {AUTOMATIC | MANUAL}][-q {true|false}] [-x {true|false}] [-j {SHORT|LONG}] [-B {NONE|SERVICE_TIME|THROUGHPUT}] [-e {NONE|SESSION|SELECT}] [-m {NONE|BASIC}] [-z ] [-w ] Usage: srvctl relocate service -d -s {-i -t | -c -n } [-f]        Specify instances for an administrator-managed database, or nodes for a policy managed database Usage: srvctl remove service -d -s [-i ] [-f] Usage: srvctl start service -d [-s "" [-n | -i ] ] [-o ] Usage: srvctl stop service -d [-s "" [-n | -i ] ] [-f] Usage: srvctl add nodeapps { { -n -A //[if1[|if2...]] } | { -S //[if1[|if2...]] } } [-p ] [-m ] [-e ] [-l ]  [-r ] [-t [:][,[:]...]] [-v] Usage: srvctl config nodeapps [-a] [-g] [-s] [-e] Usage: srvctl modify nodeapps {[-n -A /[/if1[|if2|...]]] | [-S /[/if1[|if2|...]]]} [-m ] [-p ] [-e ] [ -l ] [-r ] [-t [:][,[:]...]] [-v] Usage: srvctl start nodeapps [-n ] [-v] Usage: srvctl stop nodeapps [-n ] [-f] [-r] [-v] Usage: srvctl status nodeapps Usage: srvctl enable nodeapps [-v] Usage: srvctl disable nodeapps [-v] Usage: srvctl remove nodeapps [-f] [-y] [-v] Usage: srvctl getenv nodeapps [-a] [-g] [-s] [-e] [-t ""] Usage: srvctl setenv nodeapps {-t "=[,=,...]" | -T "="} Usage: srvctl unsetenv nodeapps -t "" [-v] Usage: srvctl add vip -n -k -A //[if1[|if2...]] [-v] Usage: srvctl config vip { -n | -i } Usage: srvctl disable vip -i [-v] Usage: srvctl enable vip -i [-v] Usage: srvctl remove vip -i "" [-f] [-y] [-v] Usage: srvctl getenv vip -i [-t ""] Usage: srvctl start vip { -n | -i } [-v] Usage: srvctl stop vip { -n   | -i } [-f] [-r] [-v] Usage: srvctl status vip { -n | -i } Usage: srvctl setenv vip -i {-t "=[,=,...]" | -T "="} Usage: srvctl unsetenv vip -i -t "" [-v] Usage: srvctl add asm [-l ] Usage: srvctl start asm [-n ] [-o ] Usage: srvctl stop asm [-n ] [-o ] [-f] Usage: srvctl config asm [-a] Usage: srvctl status asm [-n ] [-a] Usage: srvctl enable asm [-n ] Usage: srvctl disable asm [-n ] Usage: srvctl modify asm [-l ] Usage: srvctl remove asm [-f] Usage: srvctl getenv asm [-t [, ...]] Usage: srvctl setenv asm -t "= [,...]" | -T "=" Usage: srvctl unsetenv asm -t "[, ...]" Usage: srvctl start diskgroup -g [-n ""] Usage: srvctl stop diskgroup -g [-n ""] [-f] Usage: srvctl status diskgroup -g [-n ""] [-a] Usage: srvctl enable diskgroup -g [-n ""] Usage: srvctl disable diskgroup -g [-n ""] Usage: srvctl remove diskgroup -g [-f] Usage: srvctl add listener [-l ] [-s] [-p "[TCP:][, ...][/IPC:][/NMP:][/TCPS:] [/SDP:]"] [-o ] [-k ] Usage: srvctl config listener [-l ] [-a] Usage: srvctl start listener [-l ] [-n ] Usage: srvctl stop listener [-l ] [-n ] [-f] Usage: srvctl status listener [-l ] [-n ] Usage: srvctl enable listener [-l ] [-n ] Usage: srvctl disable listener [-l ] [-n ] Usage: srvctl modify listener [-l ] [-o ] [-p "[TCP:][, ...][/IPC:][/NMP:][/TCPS:] [/SDP:]"] [-u ] [-k ] Usage: srvctl remove listener [-l | -a] [-f] Usage: srvctl getenv listener [-l ] [-t [, ...]] Usage: srvctl setenv listener [-l ] -t "= [,...]" | -T "=" Usage: srvctl unsetenv listener [-l ] -t "[, ...]" Usage: srvctl add scan -n [-k [-S /[/if1[|if2|...]]]] Usage: srvctl config scan [-i ] Usage: srvctl start scan [-i ] [-n ] Usage: srvctl stop scan [-i ] [-f] Usage: srvctl relocate scan -i [-n ] Usage: srvctl status scan [-i ] Usage: srvctl enable scan [-i ] Usage: srvctl disable scan [-i ] Usage: srvctl modify scan -n Usage: srvctl remove scan [-f] [-y] Usage: srvctl add scan_listener [-l ] [-s] [-p [TCP:][/IPC:][/NMP:][/TCPS:] [/SDP:]] Usage: srvctl config scan_listener [-i ] Usage: srvctl start scan_listener [-n ] [-i ] Usage: srvctl stop scan_listener [-i ] [-f] Usage: srvctl relocate scan_listener -i [-n ] Usage: srvctl status scan_listener [-i ] Usage: srvctl enable scan_listener [-i ] Usage: srvctl disable scan_listener [-i ] Usage: srvctl modify scan_listener {-u|-p [TCP:][/IPC:][/NMP:][/TCPS:] [/SDP:]} Usage: srvctl remove scan_listener [-f] [-y] Usage: srvctl add srvpool -g [-l ] [-u ] [-i ] [-n ""] Usage: srvctl config srvpool [-g ] Usage: srvctl status srvpool [-g ] [-a] Usage: srvctl status server -n "" [-a] Usage: srvctl relocate server -n "" -g [-f] Usage: srvctl modify srvpool -g [-l ] [-u ] [-i ] [-n ""] Usage: srvctl remove srvpool -g Usage: srvctl add oc4j [-v] Usage: srvctl config oc4j Usage: srvctl start oc4j [-v] Usage: srvctl stop oc4j [-f] [-v] Usage: srvctl relocate oc4j [-n ] [-v] Usage: srvctl status oc4j [-n ] Usage: srvctl enable oc4j [-n ] [-v] Usage: srvctl disable oc4j [-n ] [-v] Usage: srvctl modify oc4j -p [-v] Usage: srvctl remove oc4j [-f] [-v] Usage: srvctl start home -o -s -n Usage: srvctl stop home -o -s -n [-t ] [-f] Usage: srvctl status home -o -s -n Usage: srvctl add filesystem -d -v -g [-m ] [-u ] Usage: srvctl config filesystem -d Usage: srvctl start filesystem -d [-n ] Usage: srvctl stop filesystem -d [-n ] [-f] Usage: srvctl status filesystem -d Usage: srvctl enable filesystem -d Usage: srvctl disable filesystem -d Usage: srvctl modify filesystem -d -u Usage: srvctl remove filesystem -d [-f] Usage: srvctl start gns [-v] [-l ] [-n ] Usage: srvctl stop gns [-v] [-n ] [-f] Usage: srvctl config gns [-v] [-a] [-d] [-k] [-m] [-n ] [-p] [-s] [-V] Usage: srvctl status gns -n Usage: srvctl enable gns [-v] [-n ] Usage: srvctl disable gns [-v] [-n ] Usage: srvctl relocate gns [-v] [-n ] [-f] Usage: srvctl add gns [-v] -d -i [-k [-S /[/]]] srvctl modify gns [-v] [-f] [-l ] [-d ] [-i ] [-N -A

] [-D -A
] [-c -a ] [-u ] [-r
] [-V ] [-F ] [-R ] [-X ] Usage: srvctl remove gns [-f] [-d ]​

Crsctl Syntax (for further explanation of these commands see the ​​Oracle Documentation​​ )

​​$ ./crsctl -h Usage: crsctl add       - add a resource, type or other entity        crsctl check     - check a service, resource or other entity        crsctl config    - output autostart configuration        crsctl debug     - obtain or modify debug state        crsctl delete    - delete a resource, type or other entity        crsctl disable   - disable autostart        crsctl enable    - enable autostart        crsctl get       - get an entity value        crsctl getperm   - get entity permissions        crsctl lsmodules - list debug modules        crsctl modify    - modify a resource, type or other entity        crsctl query     - query service state        crsctl pin       - Pin the nodes in the nodelist        crsctl relocate  - relocate a resource, server or other entity        crsctl replace   - replaces the location of voting files        crsctl setperm   - set entity permissions        crsctl set       - set an entity value        crsctl start     - start a resource, server or other entity        crsctl status    - get status of a resource or other entity        crsctl stop      - stop a resource, server or other entity        crsctl unpin     - unpin the nodes in the nodelist        crsctl unset     - unset a entity value, restoring its default​​

For more information non each command. Run "crsctl -h".

Note that the following only shows the available ocrconfig syntax. For additional explanation on what these commands do, see the ​​Oracle Documentation​​ .

​​$ ./ocrconfig -help Name:         ocrconfig - Configuration tool for Oracle Cluster/Local Registry. Synopsis:         ocrconfig [option]         option:                 [-local] -export                                                     - Export OCR/OLR contents to a file                 [-local] -import          - Import OCR/OLR contents from a file                 [-local] -upgrade [ []]                                                     - Upgrade OCR from previous version                 -downgrade [-version ]                                                     - Downgrade OCR to the specified version                 [-local] -backuploc        - Configure OCR/OLR backup location                 [-local] -showbackup [auto|manual]  - Show OCR/OLR backup information                 [-local] -manualbackup              - Perform OCR/OLR backup                 [-local] -restore         - Restore OCR/OLR from physical backup                 -replace -replacement                                                     - Replace a OCR device/file with                 -add                      - Add a new OCR device/file                 -delete                   - Remove a OCR device/file                 -overwrite                          - Overwrite OCR configuration on disk                 -repair -add | -delete | -replace -replacement                                                     - Repair OCR configuration on the local node                 -help                               - Print out this help information Note:         * A log file will be created in         $ORACLE_HOME/log//client/ocrconfig_.log. Please ensure         you have file creation privileges in the above directory before         running this tool.         * Only -local -showbackup [manual] is supported.         * Use option '-local' to indicate that the operation is to be performed on the Oracle Local Registry​​

Note that the following only shows the available olsnodes syntax. For additional explanation on what these commands do, see the ​​Oracle Documentation​​ .

​​$ ./olsnodes -h Usage: olsnodes [ [-n] [-i] [-s] [-t] [ | -l [-p]] | [-c] ] [-g] [-v]         where                 -n print node number with the node name                 -p print private interconnect address for the local node                 -i print virtual IP address with the node name                 print information for the specified node                 -l print information for the local node                 -s print node status - active or inactive                 -t print node type - pinned or unpinned                 -g turn on logging                 -v Run in debug mode; use at direction of Oracle Support only.                 -c print clusterware name​


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:11gR2 Clusterware Startup Sequence
下一篇:学位证书编号怎么查询API(学位证书编号怎么查询出来)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~