oracleclusterware命令集的分类:
oracle clusterware命令集的分类:
节点层:olsnodes
网络层:oifcfg
集群层:crsctl ocrcheck ocrdump ocrconfig
应用层:srvctl onsctl crs_stat
比较:
grid用户:
[grid@dbrac1 ~]$ which olsnodes
/oracle/app/11.2.0/grid/bin/olsnodes
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which oifcfg
/oracle/app/11.2.0/grid/bin/oifcfg
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which crsctl
/oracle/app/11.2.0/grid/bin/crsctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which ocrcheck
/oracle/app/11.2.0/grid/bin/ocrcheck
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which ocrconfig
/oracle/app/11.2.0/grid/bin/ocrconfig
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which ocrdump
/oracle/app/11.2.0/grid/bin/ocrdump
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which srvctl
/oracle/app/11.2.0/grid/bin/srvctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which onsctl
/oracle/app/11.2.0/grid/bin/onsctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which crs_stat
/oracle/app/11.2.0/grid/bin/crs_stat
oracle用户:
[oracle@dbrac1 ~]$ which olsnodes
/usr/bin/which: no olsnodes in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which oifcfg
/usr/bin/which: no oifcfg in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which crsctl
/usr/bin/which: no crsctl in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which ocrcheck
/usr/bin/which: no ocrcheck in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which ocrconfig
/usr/bin/which: no ocrconfig in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which ocrdump
/usr/bin/which: no ocrdump in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which srvctl
/oracle/app/oracle/product/11.2.0/dbhome_1/bin/srvctl
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which onsctl
/oracle/app/oracle/product/11.2.0/dbhome_1/bin/onsctl
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which crs_stat
/usr/bin/which: no crs_stat in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
一、节点层:
[grid@dbrac1 ~]$ 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
二、网络层
[grid@dbrac1 ~]$ oifcfg -h
Name:
oifcfg - Oracle Interface Configuration Tool.
Usage: oifcfg iflist [-p [-n]]
oifcfg setif {-node | -global} {/:}...
oifcfg getif [-node | -global] [ -if [/] [-type ] ]
oifcfg delif {{-node | -global} [[/]] [-force] | -force}
oifcfg [-help]
- name of the host, as known to a communications network
- name by which the interface is configured in the system
- subnet address of the interface
- type of the interface { cluster_interconnect | public }
三、集群层
1.crsctl
[grid@dbrac1 ~]$ crsctl
Usage: crsctl
command: enable|disable|config|start|stop|relocate|replace|status|add|delete|modify|getperm|setperm|check|set|get|unset|debug|lsmodules|query|pin|unpin|discover|release|request
For complete usage, use:
crsctl [-h | --help]
For detailed help on each command and object and its options use:
crsctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl enable -h
Usage:
crsctl enable crs
Enable OHAS autostart on this server
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl disable -h
Usage:
crsctl disable crs
Disable OHAS autostart on this server
[grid@dbrac1 ~]$ crsctl config -h
Usage:
crsctl config crs
Display OHAS autostart config on this server
[grid@dbrac1 ~]$ crsctl start -h
Usage:
crsctl start resource { [...]|-w ]|-all} [-n ] [-k ] [-d ] [-env "env1=val1,env2=val2,..."] [-f] [-i]
Start designated resources
where
resName [...] One or more blank-separated resource names
-w Resource filter
-all All resources
-n Server name
-k Resource cardinality ID
-d Resource degree ID
-env Attribute overrides for this command
-f Force option
-i Fail if request cannot be processed immediately
crsctl start crs [-excl [-nocrs]|-nowait]
Start OHAS on this server
where
-excl Start Oracle Clusterware in exclusive mode
-nocrs Start Oracle Clusterware in exclusive mode without starting CRS
-nowait Do not wait for OHAS to start
crsctl start cluster [[-all]|[-n[...]]]
Start CRS stack
where
Default Start local server
-all Start all servers
-n Start named servers
server [...] One or more blank-separated server names
crsctl start ip -A {|}//
Start an IP on the given interface with specified net mask
Where
IP_name Name which resolves to an IP. If it is not a fully qualified domain name then standard name search will be used.
IP_address IP address
net_mask Subnet mask for the IP to start
interface_name Interface on which to start the IP
crsctl start testDNS [-address] [-port ][-domain ] [-once][-v]
Start a test DNS listener that listens on the given address at the given port and for specified domain
Where
IP_address IP address to be used by the listener (defaults to hostname)
port The port on which the listener will listen. Default value is 53.
domain The domain query for which to listen. By default, all domain queries are processed.
-once Flag indicating that DNS listener should exit after one DNS query packet is received
-v Verbose output
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl stop -h
Usage:
crsctl stop resource {[...]|-w |-all} [-n ] [-k ] [-d ] [-env "env1=val1,env2=val2,..."] [-f] [-i]
Stop designated resources
where
resName [...] One or more blank-separated resource names
-w Resource filter
-all All resources
-n Server name
-k Resource cardinality ID
-d Resource degree ID
-env Attribute overrides for this command
-f Force option
-i Fail if request cannot be processed immediately
crsctl stop crs [-f]
Stop OHAS on this server
where
-f Force option
crsctl stop cluster [[-all]|[-n[...]]] [-f]
Stop CRS stack
where
Default Stop local server
-all Stop all servers
-n Stop named servers
server [...] One or more blank-separated server names
-f Force option
crsctl stop ip -A {|}/
Stop the designated IP address
Where
IP_name Name which resolves to an IP. If it is not fully qualified domain name then standard name search will be performed
IP_address IP address
interface_name Interface on which IP was started
crsctl stop testdns [-address] [-port ] [-v]
Stop the test DNS listener that listens on the given address and at the given port
Where
IP_address IP address on which testdns was started (defaults to hostname)
port The port on which the listener is listening. Default value for the port is 53.
-v Verbose output
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl relocate -h
Usage:
crsctl relocate resource { [-k ]| {resName|-all} -s |-w } [-n ] [-env "env1=val1,env2=val2,..."] [-f] [-i]
Relocate designated resources
where
resName Resource named resource
-all Relocate all resources
-s Source server
-w Resource filter
-n Destination server
-k Cardinality ID
-env Attribute overrides for this command
-f Force option
-i Fail if request cannot be processed immediately
crsctl relocate server [...] -c [-f] [-i]
Relocate designated servers
where
server [...] One or more blank-separated server names
spName Destination server pool name
-f Force option
-i Fail if request cannot be processed immediately
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl replace -h
Usage:
crsctl replace {discoverystring| votedisk [<+diskgroup>| ... ]}
where
ds_string comma-separated voting file paths without spaces and enclosed in quotes
diskgroup diskgroup where the voting files will be located in ASM
vdisk location of the voting files outside of ASM separated by space
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl status -h
Usage:
crsctl status {resource|type|serverpool|server} [|-w ] [-g]
where
name CRS entity name
-w CRS entity filter
-g Check if CRS entities are registered
crsctl status ip -A {|}
Check if the IP is alive
Where
IP_name Name which resolves to an IP. If name is not fully qualified domain name then standard name search will be used.
IP_address IP address
crsctl status testdns [-address] [-port ] [-v]
Check status of DNS server for specified domain
Where
IP_address DNS server address (defaults to hostname)
port The port on which the DNS server is listening. Default value for the port is 53.
-v Verbose output
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl add -h
Usage:
crsctl add {resource|type|serverpool}
where
name Name of the CRS entity
options Options to be passed to the add command
See individual CRS entity help for more details
crsctl add crs administrator -u [-f]
where
user_name User name to be added to the admin list or "*"
-f Override user name validity check
crsctl add css votedisk[...]
where
vdisk [...] One or more blank-separated voting file paths
options Options to be passed to the add command
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl delete -h
Usage:
crsctl delete resource [...] [-f] [-i]
where
resName [...] One or more resource names to be deleted
-f Force option
-i Fail if request cannot be processed immediately
crsctl delete type [...] [-i]
where
typeName [...] One or more blank-separated resource type names
-i Fail if request cannot be processed immediately
crsctl delete serverpool [...] [-i]
where
spName [...] One or more server pool names to be deleted
-i Fail if request cannot be processed immediately
crsctl delete crs administrator -u [-f]
where
user_name User name to be deleted from the admin list or "*"
-f Override user name validity check
crsctl delete css votedisk {[...]|[...]|+}
where
vdiskGUID [...] One or more blank-separated voting file GUIDs
vdisk [...] One or more blank-separated voting file paths
diskgroup The name of a diskgroup containing voting files;
allowed only when clusterware is in exclusive mode
crsctl delete node -n
where
nodename Node to be deleted
[grid@dbrac1 ~]$ crsctl modify -h
Usage:
crsctl modify {resource|type|serverpool}
where
name Name of the CRS entity
options Options to be passed to the modify command
See individual CRS entity help for more details
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl getperm -h
Usage:
crsctl getperm resource [[-u ]|[-g ]]
where
resName Get permissions for named resource
-u Get permissions for user name
-g Get permissions for group name
crsctl getperm type [[-u ]|[-g ]]
where
typeName Get permissions for named resource type
-u Get permissions for user name
-g Get permissions for group name
crsctl getperm serverpool [[-u ]|[-g ]]
where
spName Get permissions for named server pool
-u Get permissions for user name
-g Get permissions for group name
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl setperm -h
Usage:
crsctl setperm {resource|type|serverpool} {-u |-x |-o |-g }
where
-u Update entity ACL
-x Delete entity ACL
-o Change entity owner
-g Change entity primary group
ACL (Access Control List) string:
{ user:[:] |
group:[:] |
other[::] }
where
user User ACL
group Group ACL
other Other ACL
readPerm Read permission ("r" grants, "-" forbids)
writePerm Write permission ("w" grants, "-" forbids)
execPerm Execute permission ("x" grants, "-" forbids)
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl check -h
Usage:
crsctl check crs
Check status of OHAS and CRS stack
crsctl check cluster [[-all]|[-n[...]]]
Check status of CRS stack
crsctl check ctss
Check status of Cluster Time Synchronization Services
crsctl check resource { [...]|-w } [-n ] [-k ] [-d ]
Check status of resources
crsctl check css
Check status of Cluster Synchronization Services
crsctl check evm
Check status of Event Manager
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl set -h
Usage:
crsctl set crs activeversion [] [-force]
Sets the Oracle Clusterware operating version.
crsctl set {log|trace} {mdns|gpnp|css|crf|crs|ctss|evm|gipc} "=,..."
Set the log/trace levels for specific modules within daemons
crsctl set log res=
Set the log levels for agents
crsctl set css
Sets the value of a Cluster Synchronization Services parameter
crsctl set css {ipmiaddr|ipmiadmin}
Sets IPMI configuration data in the Oracle registry
crsctl set css votedisk {asm|raw [...]}
Defines the set of voting disks to be used by CRS
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl get -h
Usage:
crsctl get {log|trace} {mdns|gpnp|css|crf|crs|ctss|evm|gipc} ",..."
Get the log/trace levels for specific modules
crsctl get log res
Get the log level for an agent
crsctl get hostname
Displays the host name
crsctl get nodename
Displays the node name
crsctl get clientid dhcp -cluname -viptype [-vip ] [-n ]
Generate client ID's as used by RAC agents for configured cluster resources
where
cluster_name name of the cluster to be configured
vip_type Type of VIP resource: HOSTVIP, SCANVIP, or APPVIP
VIPResName User defined application VIP name (required for APPVIP vip_type)
nodename Node for which the client ID is required (required for HOSTVIP vip_type)
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl unset -h
Usage:
crsctl unset css
Unsets the value of a Cluster Synchronization Services parameter, restoring its default value
diagwait
disktimeout
misscount
reboottime
priority
logfilesize
crsctl unset css ipmiconfig
Unsets the IPMI configuration and deletes the associated Oracle Registry entries.
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl debug -h
Usage:
crsctl debug statedump {crs|css|evm}
where
crs Cluster Ready Services
css Cluster Synchronization Services
evm Event Manager
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl lsmodules -h
Usage:
crsctl lsmodules {mdns|gpnp|css|crf|crs|ctss|evm|gipc}
where
mdns multicast Domain Name Server
gpnp Grid Plug-n-Play Service
css Cluster Synchronization Services
crf Cluster Health Monitor
crs Cluster Ready Services
ctss Cluster Time Synchronization Service
evm EventManager
gipc Grid Interprocess Communications
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl query -h
Usage:
crsctl query crs administrator
Display admin list
crsctl query crs activeversion
Lists the Oracle Clusterware operating version
crsctl query crs releaseversion
Lists the Oracle Clusterware release version
crsctl query crs softwareversion [| -all]
Lists the version of Oracle Clusterware software installed
where
Default List software version of the local node
nodename List software version of named node
-all List software version for all the nodes in the cluster
crsctl query css ipmiconfig
Checks whether Oracle Clusterware has been configured for IPMI
crsctl query css ipmidevice
Checks whether the IPMI device/driver is present
crsctl query css votedisk
Lists the voting files used by Cluster Synchronization Services
crsctl query wallet -type [-name ] [-user ]
Check if the designated wallet or user exists
where
wallet_type Type of wallet i.e. APPQOSADMIN, APPQOSUSER or APPQOSDB.
name Name is required for APPQOSDB wallets.
user_name User to be queried from wallet.
crsctl query dns -servers
Lists the system configured DNS server, search paths, attempt and timeout values
crsctl query dns -name [-dnsserver ] [-port ] [-attempts ] [-timeout ] [-v]
Returns a list of addresses returned by DNS lookup of the name with the specified DNS server
Where
name Fully qualified domain name to lookup
DNS_server_address Address of the DNS server on which name needs to be looked up
port Port on which DNS server is listening
attempts Number of retry attempts
timeout Timeout in seconds
crsctl query socket udp [-address ] [-port]
Verifies that a daemon can listen on specified address and port
Where
address IP address on which socket needs to be created
port port on which socket needs to be created
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl pin -h
Usage:
crsctl pin css -n[...]
Pin the nodes (make leases non-expiring).
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl unpin -h
Usage:
crsctl unpin css -n[...]
Unpin the nodes (allow leases to expire).
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl discover -h
Usage:
crsctl discover dhcp -clientid [-port ]
Discover DHCP server
where
clientid client ID for which discovery will be attempted
port The port on which the discovery packets will be sent
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl release -h
Usage:
crsctl release dhcp -clientid [-port ]
Release DHCP lease for the client ID specified
where
clientid client ID for which DHCP lease release request will be attempted
port The port on which the DHCP lease release packets will be sent
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl request -h
Usage:
crsctl request dhcp -clientid [-port ]
Request DHCP lease for the client ID specified
where
clientid client ID for which DHCP lease request will be attempted
port The port on which the DHCP lease request packets will be sent
[grid@dbrac1 ~]$
2.ocrcheck
[grid@dbrac1 ~]$ ocrcheck -h
Name:
ocrcheck - Displays health of Oracle Cluster/Local Registry.
Synopsis:
ocrcheck [-config] [-local]
-config Displays the configured locations of the Oracle Cluster Registry.
This can be used with the -local option to display the configured
location of the Oracle Local Registry
-local The operation will be performed on the Oracle Local Registry.
Notes:
A log file will be created in
$ORACLE_HOME/log//client/ocrcheck_.log.
File creation privileges in the above directory are needed
when running this tool.
[grid@dbrac1 ~]$
3.ocrconfig
[grid@dbrac1 ~]$ ocrconfig -h
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 an OCR device or 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.
[grid@dbrac1 ~]$
4.ocrdump
[grid@dbrac1 ~]$ ocrdump -h
Name:
ocrdump - Dump contents of Oracle Cluster/Local Registry to a file.
Synopsis:
ocrdump [-local] [|-stdout] [-backupfile ] [-keyname ] [-xml] [-noheader]
Description:
Default filename is OCRDUMPFILE. Examples are:
prompt> ocrdump
writes cluster registry contents to OCRDUMPFILE in the current directory
prompt> ocrdump MYFILE
writes cluster registry contents to MYFILE in the current directory
prompt> ocrdump -stdout -keyname SYSTEM
writes the subtree of SYSTEM in the cluster registry to stdout
prompt> ocrdump -local -stdout -xml
writes local registry contents to stdout in xml format
prompt> ocrdump -backupfile /oracle/CRSHOME/backup.ocr -stdout -xml
writes registry contents in the backup file to stdout in xml format
Notes:
The header information will be retrieved based on best effort basis.
A log file will be created in
$ORACLE_HOME/log//client/ocrdump_.log. Make sure
you have file creation privileges in the above directory before
running this tool.
Use option '-local' to indicate that the operation is to be performed on the Oracle Local Registry.
[grid@dbrac1 ~]$
四、应用层
1.srvctl
[grid@dbrac1 ~]$ srvctl
Usage: srvctl
commands: enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config|convert|upgrade
objects: database|instance|service|nodeapps|vip|network|asm|diskgroup|listener|srvpool|server|scan|scan_listener|oc4j|home|filesystem|gns|cvu
For detailed help on each command and object and its options use:
srvctl -h or
srvctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ srvctl enable -h
The SRVCTL enable command enables the named object so that it can run under Oracle Clusterware for automatic startup, failover, or restart.
Usage: srvctl enable database -d [-n ]
Usage: srvctl enable instance -d -i ""
Usage: srvctl enable service -d -s "" [-i | -n ]
Usage: srvctl enable asm [-n]
U
网页标题:oracleclusterware命令集的分类:
网站网址:http://azwzsj.com/article/pgehjo.html
节点层:olsnodes
网络层:oifcfg
集群层:crsctl ocrcheck ocrdump ocrconfig
应用层:srvctl onsctl crs_stat
比较:
grid用户:
[grid@dbrac1 ~]$ which olsnodes
/oracle/app/11.2.0/grid/bin/olsnodes
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which oifcfg
/oracle/app/11.2.0/grid/bin/oifcfg
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which crsctl
/oracle/app/11.2.0/grid/bin/crsctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which ocrcheck
/oracle/app/11.2.0/grid/bin/ocrcheck
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which ocrconfig
/oracle/app/11.2.0/grid/bin/ocrconfig
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which ocrdump
/oracle/app/11.2.0/grid/bin/ocrdump
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which srvctl
/oracle/app/11.2.0/grid/bin/srvctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which onsctl
/oracle/app/11.2.0/grid/bin/onsctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ which crs_stat
/oracle/app/11.2.0/grid/bin/crs_stat
oracle用户:
[oracle@dbrac1 ~]$ which olsnodes
/usr/bin/which: no olsnodes in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which oifcfg
/usr/bin/which: no oifcfg in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which crsctl
/usr/bin/which: no crsctl in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which ocrcheck
/usr/bin/which: no ocrcheck in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which ocrconfig
/usr/bin/which: no ocrconfig in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which ocrdump
/usr/bin/which: no ocrdump in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which srvctl
/oracle/app/oracle/product/11.2.0/dbhome_1/bin/srvctl
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which onsctl
/oracle/app/oracle/product/11.2.0/dbhome_1/bin/onsctl
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ which crs_stat
/usr/bin/which: no crs_stat in (/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:/sbin:/bin:/usr/sbin:/usr/bin)
[oracle@dbrac1 ~]$
一、节点层:
[grid@dbrac1 ~]$ olsnodes -h
Usage: olsnodes [ [-n] [-i] [-s] [-t] [
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
-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
二、网络层
[grid@dbrac1 ~]$ oifcfg -h
Name:
oifcfg - Oracle Interface Configuration Tool.
Usage: oifcfg iflist [-p [-n]]
oifcfg setif {-node
oifcfg getif [-node
oifcfg delif {{-node
oifcfg [-help]
三、集群层
1.crsctl
[grid@dbrac1 ~]$ crsctl
Usage: crsctl
command: enable|disable|config|start|stop|relocate|replace|status|add|delete|modify|getperm|setperm|check|set|get|unset|debug|lsmodules|query|pin|unpin|discover|release|request
For complete usage, use:
crsctl [-h | --help]
For detailed help on each command and object and its options use:
crsctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl enable -h
Usage:
crsctl enable crs
Enable OHAS autostart on this server
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl disable -h
Usage:
crsctl disable crs
Disable OHAS autostart on this server
[grid@dbrac1 ~]$ crsctl config -h
Usage:
crsctl config crs
Display OHAS autostart config on this server
[grid@dbrac1 ~]$ crsctl start -h
Usage:
crsctl start resource {
Start designated resources
where
resName [...] One or more blank-separated resource names
-w Resource filter
-all All resources
-n Server name
-k Resource cardinality ID
-d Resource degree ID
-env Attribute overrides for this command
-f Force option
-i Fail if request cannot be processed immediately
crsctl start crs [-excl [-nocrs]|-nowait]
Start OHAS on this server
where
-excl Start Oracle Clusterware in exclusive mode
-nocrs Start Oracle Clusterware in exclusive mode without starting CRS
-nowait Do not wait for OHAS to start
crsctl start cluster [[-all]|[-n
Start CRS stack
where
Default Start local server
-all Start all servers
-n Start named servers
server [...] One or more blank-separated server names
crsctl start ip -A {
Start an IP on the given interface with specified net mask
Where
IP_name Name which resolves to an IP. If it is not a fully qualified domain name then standard name search will be used.
IP_address IP address
net_mask Subnet mask for the IP to start
interface_name Interface on which to start the IP
crsctl start testDNS [-address
Start a test DNS listener that listens on the given address at the given port and for specified domain
Where
IP_address IP address to be used by the listener (defaults to hostname)
port The port on which the listener will listen. Default value is 53.
domain The domain query for which to listen. By default, all domain queries are processed.
-once Flag indicating that DNS listener should exit after one DNS query packet is received
-v Verbose output
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl stop -h
Usage:
crsctl stop resource {
Stop designated resources
where
resName [...] One or more blank-separated resource names
-w Resource filter
-all All resources
-n Server name
-k Resource cardinality ID
-d Resource degree ID
-env Attribute overrides for this command
-f Force option
-i Fail if request cannot be processed immediately
crsctl stop crs [-f]
Stop OHAS on this server
where
-f Force option
crsctl stop cluster [[-all]|[-n
Stop CRS stack
where
Default Stop local server
-all Stop all servers
-n Stop named servers
server [...] One or more blank-separated server names
-f Force option
crsctl stop ip -A {
Stop the designated IP address
Where
IP_name Name which resolves to an IP. If it is not fully qualified domain name then standard name search will be performed
IP_address IP address
interface_name Interface on which IP was started
crsctl stop testdns [-address
Stop the test DNS listener that listens on the given address and at the given port
Where
IP_address IP address on which testdns was started (defaults to hostname)
port The port on which the listener is listening. Default value for the port is 53.
-v Verbose output
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl relocate -h
Usage:
crsctl relocate resource {
Relocate designated resources
where
resName Resource named resource
-all Relocate all resources
-s Source server
-w Resource filter
-n Destination server
-k Cardinality ID
-env Attribute overrides for this command
-f Force option
-i Fail if request cannot be processed immediately
crsctl relocate server
Relocate designated servers
where
server [...] One or more blank-separated server names
spName Destination server pool name
-f Force option
-i Fail if request cannot be processed immediately
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl replace -h
Usage:
crsctl replace {discoverystring
where
ds_string comma-separated voting file paths without spaces and enclosed in quotes
diskgroup diskgroup where the voting files will be located in ASM
vdisk location of the voting files outside of ASM separated by space
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl status -h
Usage:
crsctl status {resource|type|serverpool|server} [
where
name CRS entity name
-w CRS entity filter
-g Check if CRS entities are registered
crsctl status ip -A {
Check if the IP is alive
Where
IP_name Name which resolves to an IP. If name is not fully qualified domain name then standard name search will be used.
IP_address IP address
crsctl status testdns [-address
Check status of DNS server for specified domain
Where
IP_address DNS server address (defaults to hostname)
port The port on which the DNS server is listening. Default value for the port is 53.
-v Verbose output
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl add -h
Usage:
crsctl add {resource|type|serverpool}
where
name Name of the CRS entity
options Options to be passed to the add command
See individual CRS entity help for more details
crsctl add crs administrator -u
where
user_name User name to be added to the admin list or "*"
-f Override user name validity check
crsctl add css votedisk
where
vdisk [...] One or more blank-separated voting file paths
options Options to be passed to the add command
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl delete -h
Usage:
crsctl delete resource
where
resName [...] One or more resource names to be deleted
-f Force option
-i Fail if request cannot be processed immediately
crsctl delete type
where
typeName [...] One or more blank-separated resource type names
-i Fail if request cannot be processed immediately
crsctl delete serverpool
where
spName [...] One or more server pool names to be deleted
-i Fail if request cannot be processed immediately
crsctl delete crs administrator -u
where
user_name User name to be deleted from the admin list or "*"
-f Override user name validity check
crsctl delete css votedisk {
where
vdiskGUID [...] One or more blank-separated voting file GUIDs
vdisk [...] One or more blank-separated voting file paths
diskgroup The name of a diskgroup containing voting files;
allowed only when clusterware is in exclusive mode
crsctl delete node -n
where
nodename Node to be deleted
[grid@dbrac1 ~]$ crsctl modify -h
Usage:
crsctl modify {resource|type|serverpool}
where
name Name of the CRS entity
options Options to be passed to the modify command
See individual CRS entity help for more details
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl getperm -h
Usage:
crsctl getperm resource
where
resName Get permissions for named resource
-u Get permissions for user name
-g Get permissions for group name
crsctl getperm type
where
typeName Get permissions for named resource type
-u Get permissions for user name
-g Get permissions for group name
crsctl getperm serverpool
where
spName Get permissions for named server pool
-u Get permissions for user name
-g Get permissions for group name
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl setperm -h
Usage:
crsctl setperm {resource|type|serverpool}
where
-u Update entity ACL
-x Delete entity ACL
-o Change entity owner
-g Change entity primary group
ACL (Access Control List) string:
{ user:
group:
other[::
where
user User ACL
group Group ACL
other Other ACL
readPerm Read permission ("r" grants, "-" forbids)
writePerm Write permission ("w" grants, "-" forbids)
execPerm Execute permission ("x" grants, "-" forbids)
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl check -h
Usage:
crsctl check crs
Check status of OHAS and CRS stack
crsctl check cluster [[-all]|[-n
Check status of CRS stack
crsctl check ctss
Check status of Cluster Time Synchronization Services
crsctl check resource {
Check status of resources
crsctl check css
Check status of Cluster Synchronization Services
crsctl check evm
Check status of Event Manager
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl set -h
Usage:
crsctl set crs activeversion [
Sets the Oracle Clusterware operating version.
crsctl set {log|trace} {mdns|gpnp|css|crf|crs|ctss|evm|gipc} "
Set the log/trace levels for specific modules within daemons
crsctl set log res
Set the log levels for agents
crsctl set css
Sets the value of a Cluster Synchronization Services parameter
crsctl set css {ipmiaddr|ipmiadmin}
Sets IPMI configuration data in the Oracle registry
crsctl set css votedisk {asm
Defines the set of voting disks to be used by CRS
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl get -h
Usage:
crsctl get {log|trace} {mdns|gpnp|css|crf|crs|ctss|evm|gipc} "
Get the log/trace levels for specific modules
crsctl get log res
Get the log level for an agent
crsctl get hostname
Displays the host name
crsctl get nodename
Displays the node name
crsctl get clientid dhcp -cluname
Generate client ID's as used by RAC agents for configured cluster resources
where
cluster_name name of the cluster to be configured
vip_type Type of VIP resource: HOSTVIP, SCANVIP, or APPVIP
VIPResName User defined application VIP name (required for APPVIP vip_type)
nodename Node for which the client ID is required (required for HOSTVIP vip_type)
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl unset -h
Usage:
crsctl unset css
Unsets the value of a Cluster Synchronization Services parameter, restoring its default value
diagwait
disktimeout
misscount
reboottime
priority
logfilesize
crsctl unset css ipmiconfig
Unsets the IPMI configuration and deletes the associated Oracle Registry entries.
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl debug -h
Usage:
crsctl debug statedump {crs|css|evm}
where
crs Cluster Ready Services
css Cluster Synchronization Services
evm Event Manager
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl lsmodules -h
Usage:
crsctl lsmodules {mdns|gpnp|css|crf|crs|ctss|evm|gipc}
where
mdns multicast Domain Name Server
gpnp Grid Plug-n-Play Service
css Cluster Synchronization Services
crf Cluster Health Monitor
crs Cluster Ready Services
ctss Cluster Time Synchronization Service
evm EventManager
gipc Grid Interprocess Communications
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl query -h
Usage:
crsctl query crs administrator
Display admin list
crsctl query crs activeversion
Lists the Oracle Clusterware operating version
crsctl query crs releaseversion
Lists the Oracle Clusterware release version
crsctl query crs softwareversion [
Lists the version of Oracle Clusterware software installed
where
Default List software version of the local node
nodename List software version of named node
-all List software version for all the nodes in the cluster
crsctl query css ipmiconfig
Checks whether Oracle Clusterware has been configured for IPMI
crsctl query css ipmidevice
Checks whether the IPMI device/driver is present
crsctl query css votedisk
Lists the voting files used by Cluster Synchronization Services
crsctl query wallet -type
Check if the designated wallet or user exists
where
wallet_type Type of wallet i.e. APPQOSADMIN, APPQOSUSER or APPQOSDB.
name Name is required for APPQOSDB wallets.
user_name User to be queried from wallet.
crsctl query dns -servers
Lists the system configured DNS server, search paths, attempt and timeout values
crsctl query dns -name
Returns a list of addresses returned by DNS lookup of the name with the specified DNS server
Where
name Fully qualified domain name to lookup
DNS_server_address Address of the DNS server on which name needs to be looked up
port Port on which DNS server is listening
attempts Number of retry attempts
timeout Timeout in seconds
crsctl query socket udp [-address ] [-port
Verifies that a daemon can listen on specified address and port
Where
address IP address on which socket needs to be created
port port on which socket needs to be created
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl pin -h
Usage:
crsctl pin css -n
Pin the nodes (make leases non-expiring).
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl unpin -h
Usage:
crsctl unpin css -n
Unpin the nodes (allow leases to expire).
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl discover -h
Usage:
crsctl discover dhcp -clientid
Discover DHCP server
where
clientid client ID for which discovery will be attempted
port The port on which the discovery packets will be sent
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl release -h
Usage:
crsctl release dhcp -clientid
Release DHCP lease for the client ID specified
where
clientid client ID for which DHCP lease release request will be attempted
port The port on which the DHCP lease release packets will be sent
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ crsctl request -h
Usage:
crsctl request dhcp -clientid
Request DHCP lease for the client ID specified
where
clientid client ID for which DHCP lease request will be attempted
port The port on which the DHCP lease request packets will be sent
[grid@dbrac1 ~]$
2.ocrcheck
[grid@dbrac1 ~]$ ocrcheck -h
Name:
ocrcheck - Displays health of Oracle Cluster/Local Registry.
Synopsis:
ocrcheck [-config] [-local]
-config Displays the configured locations of the Oracle Cluster Registry.
This can be used with the -local option to display the configured
location of the Oracle Local Registry
-local The operation will be performed on the Oracle Local Registry.
Notes:
A log file will be created in
$ORACLE_HOME/log/
File creation privileges in the above directory are needed
when running this tool.
[grid@dbrac1 ~]$
3.ocrconfig
[grid@dbrac1 ~]$ ocrconfig -h
Name:
ocrconfig - Configuration tool for Oracle Cluster/Local Registry.
Synopsis:
ocrconfig [option]
option:
[-local] -export
- Export OCR/OLR contents to a file
[-local] -import
[-local] -upgrade [
- Upgrade OCR from previous version
-downgrade [-version
- Downgrade OCR to the specified version
[-local] -backuploc
[-local] -showbackup [auto|manual] - Show OCR/OLR backup information
[-local] -manualbackup - Perform OCR/OLR backup
[-local] -restore
-replace
- Replace an OCR device or file
-add
-delete
-overwrite - Overwrite OCR configuration on disk
-repair -add
- Repair OCR configuration on the local node
-help - Print out this help information
Note:
* A log file will be created in
$ORACLE_HOME/log/
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.
[grid@dbrac1 ~]$
4.ocrdump
[grid@dbrac1 ~]$ ocrdump -h
Name:
ocrdump - Dump contents of Oracle Cluster/Local Registry to a file.
Synopsis:
ocrdump [-local] [
Description:
Default filename is OCRDUMPFILE. Examples are:
prompt> ocrdump
writes cluster registry contents to OCRDUMPFILE in the current directory
prompt> ocrdump MYFILE
writes cluster registry contents to MYFILE in the current directory
prompt> ocrdump -stdout -keyname SYSTEM
writes the subtree of SYSTEM in the cluster registry to stdout
prompt> ocrdump -local -stdout -xml
writes local registry contents to stdout in xml format
prompt> ocrdump -backupfile /oracle/CRSHOME/backup.ocr -stdout -xml
writes registry contents in the backup file to stdout in xml format
Notes:
The header information will be retrieved based on best effort basis.
A log file will be created in
$ORACLE_HOME/log/
you have file creation privileges in the above directory before
running this tool.
Use option '-local' to indicate that the operation is to be performed on the Oracle Local Registry.
[grid@dbrac1 ~]$
四、应用层
1.srvctl
[grid@dbrac1 ~]$ srvctl
Usage: srvctl
commands: enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config|convert|upgrade
objects: database|instance|service|nodeapps|vip|network|asm|diskgroup|listener|srvpool|server|scan|scan_listener|oc4j|home|filesystem|gns|cvu
For detailed help on each command and object and its options use:
srvctl
srvctl
[grid@dbrac1 ~]$
[grid@dbrac1 ~]$ srvctl enable -h
The SRVCTL enable command enables the named object so that it can run under Oracle Clusterware for automatic startup, failover, or restart.
Usage: srvctl enable database -d
Usage: srvctl enable instance -d
Usage: srvctl enable service -d
Usage: srvctl enable asm [-n
U
网页标题:oracleclusterware命令集的分类:
网站网址:http://azwzsj.com/article/pgehjo.html