Oracle 12.1.0.2 RAC srvctl系统命令手册

前言:添加root的环境变量

[root@oracle1 /]# cd ~

[root@oracle1 ~]# vim .bash_profile

export GRID_BASE=/u01/app/grid/

export GRID_HOME=/u01/app/12.1.0/grid_1/

export PATH=$PATH:$GRID_HOME/bin

 

1    srvctl status

 

1.1    srvctl status database {-db <db_unique_name> [-serverpool <serverpool_name>] | -serverpool <serverpool_name> | -thisversion | -thishome} [-force] [-verbose]

#必须安装完oracle database 之后才可以

1.2    srvctl status instance -db <db_unique_name> {-node <node_name> | -instance <inst_name_list>} [-force] [-verbose]

1.3    srvctl status service {-db <db_unique_name> [-service  "<service_name_list>"] | -serverpool <serverpool_name> [-db <db_unique_name>]} [-force] [-verbose]

1.4    srvctl status nodeapps [-node <node_name>]

 

[root@oracle2 ~]# srvctl status nodeapps

VIP oracle1-vip is enabled

VIP oracle1-vip is running on node: oracle1

VIP oracle2-vip is enabled

VIP oracle2-vip is running on node: oracle2

Network is enabled

Network is running on node: oracle1

Network is running on node: oracle2

ONS is enabled

ONS daemon is running on node: oracle1

ONS daemon is running on node: oracle2

 

 

[root@oracle2 ~]# srvctl status nodeapps -node oracle1

VIP oracle1-vip is enabled

VIP oracle1-vip is running on node: oracle1

Network is enabled

Network is running on node: oracle1

ONS is enabled

ONS daemon is running on node: oracle1

1.5    srvctl status vip {-node <node_name> | -vip <vip_name>} [-verbose]

 

[root@oracle1 ~]# srvctl status vip -node oracle1

VIP oracle1-vip is enabled

VIP oracle1-vip is running on node: oracle1

1.6    srvctl status listener [-listener <lsnr_name>] [-node <node_name>] [-verbose]

 

[root@oracle1 ~]# srvctl status listener

Listener LISTENER is enabled

Listener LISTENER is running on node(s): oracle1,oracle2

1.7    srvctl status asm [-proxy] [-node <node_name>] [-detail] [-verbose]

 

[root@oracle1 ~]# srvctl status asm

ASM is running on oracle1,oracle2

 

 

[root@oracle1 ~]# srvctl status asm -detail -verbose

ASM is running on oracle1,oracle2

ASM is enabled.

Detailed state on node oracle1: Started

Detailed state on node oracle2: Started

 

1.8    srvctl status scan [[-netnum <network_number>] [-scannumber <scan_ordinal_number>] | -all] [-verbose]

 

[root@oracle1 ~]# srvctl status scan

SCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node oracle2

 

 

[root@oracle1 ~]# srvctl status scan -netnum 1

SCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node oracle2

 

 

[root@oracle1 ~]# srvctl status scan -scannumber 3

PRCR-1001 : Resource ora.scan3.vip does not exist

 

上述是不存在的一个scan id = 3 的异常

1.9    srvctl status scan_listener [[-netnum <network_number>] [-scannumber <scan_ordinal_number>] | -all] [-verbose]

 

[root@oracle1 ~]# srvctl status scan_listener

SCAN Listener LISTENER_SCAN1 is enabled

SCAN listener LISTENER_SCAN1 is running on node oracle2

 

 

[root@oracle1 ~]# srvctl status scan_listener -all

SCAN Listener LISTENER_SCAN1 is enabled

SCAN listener LISTENER_SCAN1 is running on node oracle2

1.10  srvctl status srvpool [-serverpool <pool_name>] [-detail]

 

[root@oracle1 ~]# srvctl status serverpool

Server pool name: Free

Active servers count: 2

Server pool name: Generic

Active servers count: 0

 

#先得到name 为Free的serverpool,再获得这个server pool的detail信息

 

[root@oracle1 ~]# srvctl status serverpool -serverpool Free -detail

Server pool name: Free

Active servers count: 2

Active server names: oracle1,oracle2

NAME=oracle1 STATE=ONLINE

NAME=oracle2 STATE=ONLINE

 

1.11  srvctl status server -servers "<server_list>" [-detail]

 

[root@oracle1 ~]# srvctl status server -servers oracle1,oracle2

Server name: oracle1

Server state: ONLINE

Server name: oracle2

Server state: ONLINE

 

 

[root@oracle1 ~]# srvctl status server -servers oracle1,oracle2 -detail

Server active pools: Free

Server name: oracle1

Server state: ONLINE

Server state details:

Server active pools: Free

Server name: oracle2

Server state: ONLINE

Server state details:

 

1.12  srvctl status oc4j [-node <node_name>] [-verbose]

 

OC4J独立版是Oracle应用服务器产品家族的成员,包含J2EE和Web服务组件。OC4J独立版提供了内嵌的HTTP/S监听器,允许客户端运行发布后的应用程序。Oc4j可以像tomcat一样部署我们的工程,访问我们的报表。

 

[root@oracle1 ~]# srvctl status oc4j

OC4J is enabled

OC4J is running on node oracle2

 

 

[root@oracle1 ~]# srvctl status oc4j -node oracle1

OC4J is enabled

OC4J is not running

 

1.13  srvctl status rhpserver

 

[root@oracle1 ~]# srvctl status rhpserver

PRCR-1001 : Resource ora.ghs does not exist

1.14  srvctl status rhpclient

 

[root@oracle1 ~]# srvctl status rhpclient

PRCR-1001 : Resource ora.ghc does not exist

1.15  srvctl status home -oraclehome <oracle_home> -statefile <state_file> -node <node_name>

 

[root@oracle1 ~]# srvctl status home -oraclehome /u01/app/12.1.0/grid_1 -statefile ~/stateReport.txt -node oracle1

Disk Group ora.DATA.dg is running on oracle1

Listener LISTENER is running on node oracle1

ONS daemon is running on node: oracle1

VIP ora.oracle1.vip is running on node: oracle1

Network is running on node: oracle1

 

 

[root@oracle1 ~]# cat stateReport.txt

diskgroup-ora.DATA.dg

lsnr-LISTENER

ons-ora.ons

vip-ora.oracle1.vip

net-ora.net1.network

 

 

[root@oracle1 ~]# srvctl status home -oraclehome /u01/app/12.1.0/grid_1 -statefile ~/stateReport.txt -node oracle2

Disk Group ora.DATA.dg is running on oracle2

Listener LISTENER is running on node oracle2

SCAN listener ora.LISTENER_SCAN1.lsnr is running on node oracle2

SCAN VIP ora.scan1.vip is running on node oracle2

ONS daemon is running on node: oracle2

VIP ora.oracle2.vip is running on node: oracle2

Network is running on node: oracle2

CVU is enabled and running on node oracle2

 

 

[root@oracle1 ~]# cat stateReport.txt

diskgroup-ora.DATA.dg

lsnr-LISTENER

scan_listener-ora.LISTENER_SCAN1.lsnr

scan_vip-ora.scan1.vip

ons-ora.ons

vip-ora.oracle2.vip

net-ora.net1.network

cvu-ora.cvu

1.16  srvctl status filesystem [-device <volume_device>] [-verbose]

 

[root@oracle1 ~]# srvctl status filesystem

PRCA-1065 : No file system resource found in Oracle Clusterware

1.17  srvctl status volume [-device <volume_device>] [-volume <volume_name>] [-diskgroup <group_name>] [-node <node_list> | -all]

 

[root@oracle1 ~]# srvctl status volume -all

PRCA-1051 : No volume resource registered with CRS for specified diskgroup or volume name or volume device

1.18  srvctl status diskgroup -diskgroup <dg_name> [-node "<node_list>"] [-detail] [-verbose]

 

[root@oracle1 ~]# srvctl status diskgroup -diskgroup DATA

Disk Group DATA is running on oracle1,oracle2

 

 

[root@oracle1 ~]# srvctl status diskgroup -diskgroup DATA -detail

Disk Group DATA is running on oracle1,oracle2

Disk Group DATA is enabled

1.19  srvctl status cvu [-node <node_name>]

 

[root@oracle1 ~]# srvctl status cvu

CVU is enabled and running on node oracle2

1.20  srvctl status gns [-node <node_name>] [-verbose]

 

[root@oracle1 ~]# srvctl status gns

PRKF-1117 : GNS server is not configured in this cluster.

1.21  srvctl status mgmtdb [-verbose]

 

[root@oracle1 ~]# srvctl status mgmtdb

Database is enabled

Instance -MGMTDB is running on node oracle2

1.22  srvctl status mgmtlsnr [-verbose]

 

[root@oracle1 ~]# srvctl status mgmtlsnr

Listener MGMTLSNR is enabled

Listener MGMTLSNR is running on node(s): oracle2

1.23  srvctl status exportfs [-name <expfs_name> |-id <havip id>]

 

[root@oracle1 ~]# srvctl status exportfs

PRCE-1012 : export file system resource does not exist in Oracle Clusterware

1.24  srvctl status havip [-id <id>]

 

[root@oracle1 ~]# srvctl status havip

PRCE-1006 : HA VIP resource does not exist in Oracle Clusterware

1.25  srvctl status mountfs -name <mountfs_name>

 

[root@oracle1 ~]# srvctl status mountfs -name fat

PRCR-1001 : Resource ora.fat.mount does not exist

 

-name : unique name for the Network Attached Storage (NAS)

2    srvctl enable

 

 

2.1    srvctl enable database -db <db_unique_name> [-node <node_name>]

2.2    srvctl enable instance -db <db_unique_name> -instance "<inst_name_list>"

2.3    srvctl enable service -db <db_unique_name> -service  "<service_name_list>" [-instance <inst_name> | -node <node_name>] [-global_override]

2.4    srvctl enable asm [-proxy] [-node <node_name>]

2.5    srvctl enable listener [-listener <lsnr_name>] [-node <node_name>]

2.6    srvctl enable nodeapps [-adminhelper] [-verbose]

2.7    srvctl enable vip -vip <vip_name> [-verbose]

2.8    srvctl enable scan [-netnum <network_number>] [-scannumber <scan_ordinal_number>]

2.9    srvctl enable scan_listener [-netnum <network_number>] [-scannumber <scan_ordinal_number>]

2.10  srvctl enable oc4j [-node <node_name>] [-verbose]

2.11  srvctl enable rhpserver [-node <node_name>]

2.12  srvctl enable rhpclient [-node <node_name>]

2.13  srvctl enable filesystem -device <volume_device>

2.14  srvctl enable volume {-volume <volume_name> -diskgroup <group_name> | -device <volume_device>} [-node <node_name>]

2.15  srvctl enable diskgroup -diskgroup <dg_name> [-node "<node_list>"]

2.16  srvctl enable gns [-node <node_name>] [-verbose]

2.17  srvctl enable cvu [-node <node_name>]

2.18  srvctl enable mgmtdb [-node <node_name>]

2.19  srvctl enable mgmtlsnr [-node <node_name>]

2.20  srvctl enable exportfs -name <expfs_name>

2.21  srvctl enable havip -id <id> [-node <node_name>]

2.22  srvctl enable mountfs -name <mountfs_name> [-node <node_list>]

3    srvctl disable

 

3.1    srvctl disable database -db <db_unique_name> [-node <node_name>]

3.2    srvctl disable instance -db <db_unique_name> -instance "<inst_name_list>"

3.3    srvctl disable service -db <db_unique_name> -service  "<service_name_list>" [-instance <inst_name> | -node <node_name>] [-global_override]

3.4    srvctl disable asm [-proxy] [-node <node_name>]

3.5    srvctl disable listener [-listener <lsnr_name>] [-node <node_name>]

3.6    srvctl disable nodeapps [-adminhelper] [-verbose]

3.7    srvctl disable vip -vip <vip_name> [-verbose]

3.8    srvctl disable scan [-netnum <network_number>] [-scannumber <scan_ordinal_number>]

3.9    srvctl disable scan_listener [-netnum <network_number>] [-scannumber <scan_ordinal_number>]

3.10  srvctl disable oc4j [-node <node_name>] [-verbose]

3.11  srvctl disable rhpserver [-node <node_name>]

3.12  srvctl disable rhpclient [-node <node_name>]

3.13  srvctl disable filesystem -device <volume_device>

3.14  srvctl disable volume {-volume <volume_name> -diskgroup <group_name> | -device <volume_device>} [-node <node_name>]

3.15  srvctl disable diskgroup -diskgroup <dg_name> [-node "<node_list>"]

3.16  srvctl disable gns [-node <node_name>] [-verbose]

3.17  srvctl disable cvu [-node <node_name>]

3.18  srvctl disable mgmtdb [-node <node_name>]

3.19  srvctl disable mgmtlsnr [-node <node_name>]

3.20  srvctl disable exportfs -name <expfs_name>

3.21  srvctl disable havip -id <id> [-node <node_name>]

3.22  srvctl disable mountfs -name <mountfs_name> [-node <node_list>]

4    srvctl export

4.1    srvctl export gns {-instance <filename> | -clientdata <filename>}

5    srvctl import

5.1    srvctl import gns -instance <filename>

6    srvctl start

6.1    srvctl start database -db <db_unique_name> [-startoption <start_options>] [-startconcurrency <start_concurrency>] [-node <node>] [-eval] [-verbose]

6.2    srvctl start instance -db <db_unique_name> {-node <node_name> [-instance <inst_name>] | -instance <inst_name_list>} [-startoption <start_options>]

6.3    srvctl start service -db <db_unique_name> [-service  "<service_name_list>"] [-serverpool <pool_name>] [-node <node_name> | -instance <inst_name>] [-pq] [-global_override] [-startoption <start_options>] [-eval] [-verbose]

6.4    srvctl start nodeapps [-node <node_name>] [-adminhelper | -onsonly] [-verbose]

6.5    srvctl start vip {-node <node_name> [-netnum <network_number>] | -vip <vip_name>} [-verbose]

6.6    srvctl start asm [-proxy] [-node <node_name>] [-startoption <start_options>]

6.7    srvctl start listener [-listener <lsnr_name>] [-node <node_name>]

6.8    srvctl start scan [-netnum <network_number>] [-scannumber <scan_ordinal_number>] [-node <node_name>]

6.9    srvctl start scan_listener [-netnum <network_number>] [-scannumber <scan_ordinal_number>] [-node <node_name>]

6.10  srvctl start oc4j [-node <node_name>] [-verbose]

6.11  srvctl start rhpserver [-node <node_name>]

6.12  srvctl start rhpclient [-node <node_name>]

6.13  srvctl start havip -id <id> [-node <node_name>]

6.14  srvctl start exportfs {-name <expfs_name> | -id <havip id> }

6.15  srvctl start home -oraclehome <oracle_home> -statefile <state_file> -node <node_name>

6.16  srvctl start filesystem -device <volume_device> [-node <node_name>]

6.17  srvctl start volume {-volume <volume_name> -diskgroup <group_name> | -device <volume_device>} [-node <node_list>]

6.18  srvctl start diskgroup -diskgroup <dg_name> [-node "<node_list>"]

6.19  srvctl start gns [-loglevel <log_level>] [-node <node_name>] [-verbose]

6.20  srvctl start cvu [-node <node_name>]

6.21  srvctl start mgmtdb [-startoption <start_option>] [-node <node_name>]

6.22  srvctl start mgmtlsnr [-node <node_name>]

6.23  srvctl start mountfs -name <mountfs_name> [-node <node_list>]

7    srvctl stop

 

7.1    srvctl stop database -db <db_unique_name> [-stopoption <stop_options>] [-stopconcurrency <stop_concurrency>] [-force] [-eval] [-verbose]

7.2    srvctl stop instance -db <db_unique_name> {-node <node_name> | -instance <inst_name_list>}  [-stopoption <stop_options>] [-force] [-failover]

7.3    srvctl stop service -db <db_unique_name> [-service  "<service_name_list>"] [-serverpool <pool_name>] [-node <node_name> | -instance <inst_name>] [-pq] [-global_override] [-force [-noreplay]] [-eval] [-verbose]

7.4    srvctl stop nodeapps [-node <node_name>] [-adminhelper | -onsonly | -relocate] [-force] [-verbose]

7.5    srvctl stop vip {-node <node_name> [-netnum <network_number>] | -vip <vip_name>} [-force] [-relocate] [-verbose]

7.6    srvctl stop asm [-proxy] [-node <node_name>] [-stopoption <stop_options>] [-force]

7.7    srvctl stop listener [-listener <lsnr_name>] [-node <node_name>] [-force]

7.8    srvctl stop scan [-netnum <network_number>] [-scannumber <scan_ordinal_number>] [-force]

7.9    srvctl stop scan_listener [-netnum <network_number>] [-scannumber <scan_ordinal_number>] [-force]

7.10  srvctl stop oc4j [-force] [-verbose]

7.11  srvctl stop rhpserver

7.12  srvctl stop rhpclient

7.13  srvctl stop havip -id <id> [-node <node_name>] [-force]

7.14  srvctl stop exportfs {-name <expfs_name> | -id <havip id> } [-force]

7.15  srvctl stop home -oraclehome <oracle_home> -statefile <state_file> -node <node_name> [-stopoption <stop_options>] [-force]

7.16  srvctl stop filesystem -device <volume_device> [-node <node_name>] [-force]

7.17  srvctl stop volume {-volume <volume_name> -diskgroup <group_name> | -device <volume_device>} [-node <node_list>] [-force]

7.18  srvctl stop diskgroup -diskgroup <dg_name> [-node "<node_list>"] [-force]

7.19  srvctl stop gns [-node <node_name>] [-force] [-verbose]

7.20  srvctl stop cvu [-force]

7.21  srvctl stop mgmtdb [-stopoption <stop_option>] [-force]

7.22  srvctl stop mgmtlsnr [-node <node_name>] [-force]

7.23  srvctl stop mountfs -name <mountfs_name> [-node <node_list>] [-force]

8    srvctl relocate

 

8.1    srvctl relocate database -db <db_unique_name> {[-node <target>] [-timeout <timeout>] [-stopoption <stop_option>] | -abort [-revert]} [-verbose]

8.2    srvctl relocate service -db <db_unique_name> -service <service_name> {-oldinst <old_inst_name> -newinst <new_inst_name> | -currentnode <current_node> -targetnode <target_node>} [-pq] [-force [-noreplay]] [-eval] [-verbose]

8.3    srvctl relocate server -servers "<server_list>" -serverpool <pool_name> [-force] [-eval] [-verbose]

8.4    srvctl relocate vip -vip <vip_name> [-node <node_name>] [-force] [-verbose]

8.5    srvctl relocate scan -scannumber <scan_ordinal_number> [-netnum <network_number>] [-node <node_name>]

8.6    srvctl relocate scan_listener -scannumber <scan_ordinal_number> [-netnum <network_number>] [-node <node_name>]

8.7    srvctl relocate oc4j [-node <node_name>] [-verbose]

8.8    srvctl relocate rhpserver [-node <node_name>]

8.9    srvctl relocate rhpclient [-node <node_name>]

8.10  srvctl relocate gns [-node <node_name>] [-verbose]

8.11  srvctl relocate cvu [-node <node_name>]

8.12  srvctl relocate mgmtdb [-node <node_name>]

8.13  srvctl relocate filesystem -device <volume_device> [-node <node_name>] [-force] [-verbose]

8.14  srvctl relocate asm -currentnode <current_node> [-targetnode <target_node>] [-force]

8.15  srvctl relocate havip -id <id> [-node <node_name>] [-force]

9    srvctl add

9.1    srvctl add database -db <db_unique_name> -oraclehome <oracle_home> [-dbtype {RACONENODE | RAC | SINGLE} [-server <server_list>] [-instance <inst_name>] [-timeout <timeout>]] [-domain <domain_name>] [-spfile <spfile>] [-pwfile <password_file_path>] [-role {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY | FAR_SYNC}] [-startoption <start_options>] [-stopoption <stop_options>] [-startconcurrency <start_concurrency>] [-stopconcurrency <stop_concurrency>] [-dbname <db_name>] [-policy {AUTOMATIC | MANUAL | NORESTART}] [-serverpool "<serverpool_list>" [-pqpool <pq_server_pools>]] [-node <node_name>] [-diskgroup "<diskgroup_list>"] [-acfspath "<acfs_path_list>"] [-eval] [-fixed] [-verbose]

9.2    srvctl add instance -db <db_unique_name> -instance <inst_name> -node <node_name> [-force]

9.3    srvctl add service -db <db_unique_name> -service <service_name> {-preferred "<preferred_list>" [-available "<available_list>"] [-tafpolicy {BASIC | NONE | PRECONNECT}] | -serverpool <pool_name> [-cardinality {UNIFORM | SINGLETON}] } [-netnum <network_number>] [-role "[PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]"] [-policy {AUTOMATIC | MANUAL}] [-notification {TRUE|FALSE}] [-dtp {TRUE|FALSE}] [-clbgoal {SHORT|LONG}] [-rlbgoal {NONE|SERVICE_TIME|THROUGHPUT}] [-failovertype {NONE|SESSION|SELECT|TRANSACTION}] [-failovermethod {NONE|BASIC}] [-failoverretry <failover_retries>] [-failoverdelay <failover_delay>] [-edition <edition>] [-pdb <pluggable_database>] [-global {TRUE|FALSE}] [-maxlag <max_lag_time>] [-sql_translation_profile <sql_translation_profile>] [-commit_outcome {TRUE|FALSE}] [-retention <retention>] [-replay_init_time <replay_initiation_time>] [-session_state {STATIC|DYNAMIC}] [-pqservice <pq_service>] [-pqpool <pq_pool_list>] [-gsmflags <gsm_flags>] [-force] [-eval] [-verbose]

9.4    srvctl add service -db <db_unique_name> -service <service_name> -update {-preferred "<new_pref_inst>" | -available "<new_avail_inst>"} [-force] [-verbose]

9.5    srvctl add nodeapps { { -node <node_name> -address {<vip_name>|<ip>}/<netmask>[/if1[|if2...]] [-skip]} | { -subnet <subnet>/<netmask>[/if1[|if2...]] } } [-emport <em_port>] [-onslocalport <ons_local_port>]  [-onsremoteport <ons_remote_port>] [-remoteservers <host>[:<port>][,<host>[:<port>]...]] [-clientdata <file>] [-pingtarget "<pingtarget_list>"] [-verbose]

9.6    srvctl add vip -node <node_name> -netnum <network_number> -address {<name>|<ip>}/<netmask>[/if1[|if2...]] [-skip] [-verbose]

9.7    srvctl add network [-netnum <network_number>] -subnet <subnet>/<netmask>[/if1[|if2...]] [-nettype {STATIC|DHCP|AUTOCONFIG|MIXED}] [-pingtarget "<pingtarget_list>"] [-leaf] [-verbose]

9.8    srvctl add asm [-listener <lsnr_name>] [-pwfile <password_file_path>] [-flex [-count {<number_of_instances>|ALL}]|-proxy]

9.9    srvctl add listener [-listener <lsnr_name>] {[-netnum <network_number>] [-oraclehome <path>] [-user <oracle_user>] | -asmlistener [-subnet <subnet>] | -leaflistener [-subnet <subnet>]} [-skip] [-endpoints "[TCP:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"] [-invitednodes <node_list>] [-invitedsubnets <subnet_list>]

9.10  srvctl add scan -scanname <scan_name> [-netnum <network_number>]

9.11  srvctl add scan_listener [-netnum <network_number>] [-listener <lsnr_name_prefix>] [-skip] [-endpoints [TCP:]<port>[/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]] [-invitednodes <node_list>] [-invitedsubnets <subnet_list>]

9.12  srvctl add srvpool -serverpool <pool_name> [-min <min>] [-max <max>] [-importance <importance>] [-servers "<server_list>" | -category <server_category>] [-force] [-eval] [-verbose]

9.13  srvctl add oc4j [-verbose]

9.14  srvctl add rhpserver -storage <base_path> -diskgroup <dg_name>

9.15  srvctl add rhpclient -clientdata <file> [-diskgroup <dg_name> -storage <base_path>]

9.16  srvctl add havip -id <id> -address {<name>|<ip>} [-netnum <network_number>] [-description <text>] [-skip] [-homenode <node_name>]

9.17  srvctl add exportfs -name <expfs_name>  -id <id> -path <exportpath> [-clients <export_clients>] [-options <export_options>]

9.18  srvctl add filesystem -device <volume_device> -path <mountpoint_path> [-volume <volume_name>] [-diskgroup <dg_name>] [-node <node_list> | -serverpool <serverpool_list>] [-user <user_list>] [-fstype {ACFS|EXT3|EXT4}] [-fsoptions <options>] [-description <description>] [-appid <application_id>] [-autostart {ALWAYS|NEVER|RESTORE}] [-auxvolumes <volume_device>]

9.19  srvctl add gns {-vip {<vip_name> | <ip>} [-skip] [-domain <domain>] [-verbose] | -clientdata <filename>}

9.20  srvctl add cvu [-checkinterval <check_interval_in_minutes>]

9.21  srvctl add mgmtdb [-domain <domain_name>]

9.22  srvctl add mgmtlsnr [-endpoints "[TCP:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"] [-skip]

9.23  srvctl add mountfs -name <mountfs_name> -path <mount_path> -exportserver <server_name> -exportpath <path> [-mountoptions <mount_options>] [-user <user>]

10  srvctl remove

 

10.1  srvctl remove database -db <db_unique_name> [-force] [-noprompt] [-verbose]

10.2  srvctl remove instance -db <db_unique_name> -instance <inst_name> [-force] [-noprompt]

10.3  srvctl remove service -db <db_unique_name> -service <service_name> [-instance <inst_name>] [-global_override] [-force]

10.4  srvctl remove nodeapps [-force] [-noprompt] [-verbose]

10.5  srvctl remove vip -vip <vip_name_list> [-force] [-noprompt] [-verbose]

10.6  srvctl remove network {-netnum <network_number> | -all} [-force] [-verbose]

10.7  srvctl remove asm [-proxy] [-force]

10.8  srvctl remove listener [-listener <lsnr_name> | -all] [-force]

10.9  srvctl remove scan [-netnum <network_number>] [-force] [-noprompt]

10.10 srvctl remove scan_listener [-netnum <network_number>] [-force] [-noprompt]

10.11 srvctl remove srvpool -serverpool <pool_name> [-eval] [-verbose]

10.12 srvctl remove oc4j [-force] [-verbose]

10.13 srvctl remove rhpserver [-force]

10.14 srvctl remove rhpclient [-force]

10.15 srvctl remove havip -id <id> [-force]

10.16 srvctl remove exportfs -name <expfs_name> [-force]

10.17 srvctl remove filesystem -device <volume_device> [-force]

10.18 srvctl remove diskgroup -diskgroup <dg_name> [-force]

10.19 srvctl remove gns [-force] [-verbose]

10.20 srvctl remove cvu [-force]

10.21 srvctl remove mgmtdb [-force] [-noprompt] [-verbose]

10.22 srvctl remove mgmtlsnr [-force]

10.23 srvctl remove mountfs -name <mountfs_name> [-force]

11  srvctl modify

 

11.1  srvctl modify database -db <db_unique_name> [-dbname <db_name>] [-instance <instance_name>] [-oraclehome <oracle_home>] [-user <oracle_user>] [-server <server_list>] [-timeout <timeout>] [-domain <domain>] [-spfile <spfile>] [-pwfile <password_file_path>] [-role {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY}] [-startoption <start_options>] [-stopoption <stop_options>] [-startconcurrency <start_concurrency>] [-stopconcurrency <stop_concurrency>][-policy {AUTOMATIC | MANUAL | NORESTART}] [-serverpool "<serverpool_list>" [-node <node_name>]] [-pqpool <pq_server_pools>] [-diskgroup "<diskgroup_list>"|-nodiskgroup] [-acfspath "<acfs_path_list>"] [-force] [-eval] [-verbose]

11.2  srvctl modify instance -db <db_unique_name> -instance <inst_name> -node <node_name>

11.3  srvctl modify service -db <db_unique_name> -service <service_name> -oldinst <old_inst_name> -newinst <new_inst_name> [-force]

11.4  srvctl modify service -db <db_unique_name> -service <service_name> -available <avail_inst_name> -toprefer [-force]

11.5  srvctl modify service -db <db_unique_name> -service <service_name> -modifyconfig -preferred "<preferred_list>" [-available "<available_list>"] [-force]

11.6  srvctl modify service -db <db_unique_name> -service <service_name> [-serverpool <pool_name>] [-pqservice <pqsvc_name>] [-pqpool <pq_pool_list>] [-cardinality {UNIFORM | SINGLETON}] [-tafpolicy {BASIC|NONE}] [-role [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]] [-policy {AUTOMATIC | MANUAL}][-notification {TRUE|FALSE}] [-dtp {TRUE|FALSE}] [-clbgoal {SHORT|LONG}] [-rlbgoal {NONE|SERVICE_TIME|THROUGHPUT}] [-failovertype {NONE|SESSION|SELECT|TRANSACTION}] [-failovermethod {NONE|BASIC}] [-failoverretry <integer>] [-failoverdelay <integer>] [-edition <edition>] [-pdb <pluggable_database>] [-sql_translation_profile <sql_translation_profile>] [-commit_outcome {TRUE|FALSE}] [-retention <retention>] [-replay_init_time <replay_initiation_time>] [-session_state {STATIC|DYNAMIC}] [-maxlag <max_lag_time>] [-gsmflags <gsm_flags>] [-global_override] [-eval] [-verbose] [-force]

11.7  srvctl modify asm [-listener <lsnr_name>] [-pwfile <password_file_path>] [-count {<number_of_instances>|ALL}] [-force]

11.8  srvctl modify nodeapps {[-node <node_name> -address {<vip_name>|<ip>}/<netmask>[/if1[|if2...]] [-skip]] | [-subnet <subnet>/<netmask>[/if1[|if2|...]]]} [-nettype {STATIC|DHCP|AUTOCONFIG|MIXED}] [-emport <em_port>] [ -onslocalport <ons_local_port> ] [-onsremoteport <ons_remote_port> ] [-remoteservers <host>[:<port>][,<host>[:<port>]...]] [-clientdata <file>] [-pingtarget "<pingtarget_list>"] [-verbose]

11.9  srvctl modify listener [-listener <lsnr_name>] [-oraclehome <path>] [-endpoints "[TCP:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"] [-user <oracle_user>] [-netnum <network_number>]

11.10 srvctl modify network [-netnum <network_number>] [-subnet <subnet>/<netmask>[/if1[|if2...]]] [-nettype {STATIC|DHCP|AUTOCONFIG|MIXED}] [-iptype {IPV4|IPV6|BOTH}] [-pingtarget "<pingtarget_list>"] [-verbose]

11.11 srvctl modify scan -scanname <scan_name> [-netnum <network_number>]

11.12 srvctl modify scan_listener {-update|-endpoints [TCP:]<port>[/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]} [-netnum <network_number>] [-invitednodes <node_list>] [-invitedsubnets <subnet_list>]

11.13 srvctl modify srvpool -serverpool <pool_name> [-min <min>] [-max <max>] [-importance <importance>] [-servers "<server_list>" | -category <server_category>] [-force] [-eval] [-verbose]

11.14 srvctl modify oc4j [-rmiport <oc4j_rmi_port>] [-httpport <oc4j_http_port>] [-verbose] [-force]

11.15 srvctl modify rhpserver [-port <rmi_port> [-force]]

11.16 srvctl modify rhpclient [-clientdata <file>] [-port <rmi_port>] [-diskgroup <dg_name> -storage <base_path>]

11.17 srvctl modify filesystem -device <volume_device> [-user {[/+ | /-]<user> | <user_list>}] [-path <mountpoint_path>] [-node <node_list> | -serverpool <serverpool_list>] [-fsoptions <options>] [-description <description>] [-autostart  {ALWAYS|NEVER|RESTORE}] [-force]

11.18 srvctl modify gns {-loglevel <log_level> | [-resolve <name>] [-verify <name>] [-parameter <name>:<value>[,<name>:<value>...]] [-vip {<vip_name> | <ip>} [-skip]] [-clientdata <filename>] [-verbose]}

11.19 srvctl modify cvu -checkinterval <check_interval_in_minutes>

11.20 srvctl modify mgmtdb [-pwfile <password_file_path>] [-spfile <server_parameter_file>]

11.21 srvctl modify mgmtlsnr -endpoints "[TCP:]<port>[,...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"

11.22 srvctl modify exportfs -name <expfs_name> [-path <exportpath>] [-clients <export_clients>] [-options <export_options>]

11.23 srvctl modify havip -id <id> [-address {<name>|<ip>} [-netnum <network_number>] [-skip]] [-description <text>] [-homenode <node_name>]

11.24 srvctl modify mountfs -name <mountfs_name> [-path <mount_path>] [-exportserver <server_name>] [-exportpath <path>] [-mountoptions <mount_options>] [-user <user>]

12  srvctl getenv

 

12.1  srvctl getenv database -db <db_unique_name> [-envs "<name>[,...]"]

12.2  srvctl getenv nodeapps [-viponly] [-onsonly] [-envs "<name>[,...]"]

 

[root@oracle1 ~]# srvctl getenv nodeapps

VIP environment variables:

oracle1-vip:

oracle2-vip:

ONS environment variables:

ons:

12.3  srvctl getenv vip -vip <vip_name> [-envs "<name>[,...]"]

 

[root@oracle1 ~]# srvctl getenv vip -vip oracle2-vip

VIP environment variables:

oracle2-vip:

12.4  srvctl getenv listener [-listener <lsnr_name>] [-envs "<name>[,...]"]

 

[root@oracle1 ~]# srvctl getenv listener

LISTENER:

12.5  srvctl getenv asm [-envs "<name>[,...]"]

12.6  srvctl getenv mgmtdb [-envs "<name>[,...]"]

12.7  srvctl getenv mgmtlsnr [ -envs "<name>[,...]"]

13  srvctl setenv

 

13.1  srvctl setenv database -db <db_unique_name> {-envs "<name>=<val>[,...]" | -env "<name>=<val>"}

13.2  srvctl setenv nodeapps {-envs "<name>=<val>[,...]" | -env "<name>=<val>"} [-viponly | -onsonly] [-verbose]

13.3  srvctl setenv vip -vip <vip_name> {-envs "<name>=<val>[,...]" | -env "<name>=<val>"} [-verbose]

13.4  srvctl setenv listener [-listener <lsnr_name>] {-envs "<name>=<val>[,...]" | -env "<name>=<value>"}

13.5  srvctl setenv asm {-envs "<name>=<val>[,...]" | -env "<name>=<value>"}

13.6  srvctl setenv mgmtdb {-envs "<name>=<value>[,...]" | -env "<name=value>"}

13.7  srvctl setenv mgmtlsnr { -envs "<name>=<val>[,...]" | -env "<name>=<value>"}

 

14  srvctl unsetenv

 

14.1  srvctl unsetenv database -db <db_unique_name> -envs "<name>[,...]"

14.2  srvctl unsetenv nodeapps -envs "<name>[,...]" [-viponly | -onsonly] [-verbose]

14.3  srvctl unsetenv vip -vip <vip_name> -envs "<name>[,...]" [-verbose]

14.4  srvctl unsetenv listener [-listener <lsnr_name>] -envs "<name>[,...]"

14.5  srvctl unsetenv asm -envs "<name>[,...]"

14.6  srvctl unsetenv mgmtdb -envs "<name>[,..]"

14.7  srvctl unsetenv mgmtlsnr -envs "<name>[,...]"

15  srvctl config

 

15.1  srvctl config database [-db <db_unique_name> [-all] | -serverpool <serverpool_name>] [-verbose]

15.2  srvctl config service {-db <db_unique_name> [-service <service_name>] | -serverpool <serverpool_name> [-db <db_unique_name>]} [-verbose]

15.3  srvctl config nodeapps [-viponly] [-onsonly]

 

[root@oracle1 ~]# srvctl config nodeapps

Network 1 exists

Subnet IPv4: 192.168.10.0/255.255.255.0/enp0s3, static

Subnet IPv6:

Ping Targets:

Network is enabled

Network is individually enabled on nodes:

Network is individually disabled on nodes:

VIP exists: network number 1, hosting node oracle1

VIP Name: oracle1-vip

VIP IPv4 Address: 192.168.10.111

VIP IPv6 Address:

VIP is enabled.

VIP is individually enabled on nodes:

VIP is individually disabled on nodes:

VIP exists: network number 1, hosting node oracle2

VIP Name: oracle2-vip

VIP IPv4 Address: 192.168.10.112

VIP IPv6 Address:

VIP is enabled.

VIP is individually enabled on nodes:

VIP is individually disabled on nodes:

ONS exists: Local port 6100, remote port 6200, EM port 2016, Uses SSL false

ONS is enabled

ONS is individually enabled on nodes:

ONS is individually disabled on nodes:

15.4  srvctl config vip {-node <node_name> | -vip <vip_name>}

 

[root@oracle1 ~]# srvctl config vip -vip oracle1-vip

VIP exists: network number 1, hosting node oracle1

VIP Name: oracle1-vip

VIP IPv4 Address: 192.168.10.111

VIP IPv6 Address:

VIP is enabled.

VIP is individually enabled on nodes:

VIP is individually disabled on nodes:

15.5  srvctl config network [-netnum <network_number>]

 

[root@oracle1 ~]# srvctl config network

Network 1 exists

Subnet IPv4: 192.168.10.0/255.255.255.0/enp0s3, static

Subnet IPv6:

Ping Targets:

Network is enabled

Network is individually enabled on nodes:

Network is individually disabled on nodes:

15.6  srvctl config asm [-proxy] [-detail]

 

[root@oracle1 ~]# srvctl config asm

ASM home: <CRS home>

Password file: +DATA/orapwASM

ASM listener: LISTENER

15.7  srvctl config listener [-listener <lsnr_name> | -asmlistener | -leaflistener] [-all]

 

[root@oracle1 ~]# srvctl config listener

Name: LISTENER

Type: Database Listener

Network: 1, Owner: grid

Home: <CRS home>

End points: TCP:1521

Listener is enabled.

Listener is individually enabled on nodes:

Listener is individually disabled on nodes:

15.8  srvctl config scan [[-netnum <network_number>] [-scannumber <scan_ordinal_number>] | -all]

 

SCAN name: oracle-scan, Network: 1

Subnet IPv4: 192.168.10.0/255.255.255.0/enp0s3, static

Subnet IPv6:

SCAN 0 IPv4 VIP: 192.168.10.6

SCAN VIP is enabled.

SCAN VIP is individually enabled on nodes:

SCAN VIP is individually disabled on nodes:

15.9  srvctl config scan_listener [[-netnum <network_number>] [-scannumber <scan_ordinal_number>] | -all]

 

[root@oracle1 ~]# srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521

Registration invited nodes:

Registration invited subnets:

SCAN Listener is enabled.

SCAN Listener is individually enabled on nodes:

SCAN Listener is individually disabled on nodes:

15.10 srvctl config srvpool [-serverpool <pool_name>]

15.11 srvctl config oc4j

15.12 srvctl config rhpserver

15.13 srvctl config rhpclient

15.14 srvctl config filesystem [-device <volume_device>]

15.15 srvctl config volume [-volume <volume_name>] [-diskgroup <group_name>] [-device <volume_device>]

15.16 srvctl config gns [-detail] [-subdomain] [-multicastport] [-node <node_name>] [-port] [-status] [-version] [-query <name>] [-list] [-clusterguid] [-clustername] [-clustertype] [-loglevel] [-network] [-verbose]

15.17 srvctl config cvu

15.18 srvctl config exportfs [-name <expfs_name> | -id <havip id>]

15.19 srvctl config mgmtdb [-verbose] [-all]

15.20 srvctl config mgmtlsnr [-all]

15.21 srvctl config mountfs [-name <mountfs_name>]

16  srvctl convert

16.1  srvctl convert database -db <db_unique_name> -dbtype RAC [-node <node>]

16.2  srvctl convert database -db <db_unique_name> -dbtype RACONENODE [-instance <inst_name>] [-timeout <timeout>]

 

17  srvctl update

 

17.1  srvctl update listener [-listener <lsnr_name> -asm -remove [-force]]

17.2  srvctl update scan_listener

17.3  srvctl update database -db <db_unique_name> [-startoption <start_options> [-node <node_name]]

17.4  srvctl update mgmtdb -startoption <start_options>

17.5  srvctl update instance -db <db_unique_name> {-instance <instance_name> | -node <node_name>} -startoption <start_options>

17.6  srvctl update gns {-advertise <name> -address <address> [-timetolive <time_to_live>] | -delete <name> [-address <address>] | -alias <alias> -name <name> [-timetolive <time_to_live>] | -deletealias <alias> | -createsrv <service> -target <target> -protocol <protocol> [-weight <weight>] [-priority <priority>] [-port <port_number>] [-timetolive <time_to_live>] [-instance <instance_name>] | -deletesrv <service_name> -target <target> -protocol <protocol> [-instance <instance_name>] | -createtxt <name> -target <target> [-timetolive <time_to_live>] [-namettl <name_ttl>] | -deletetxt <name> -target <target> | -createptr <name> -target <target> [-timetolive <time_to_live>] [-namettl <name_ttl>] | -deleteptr <name> -target <target>} [-verbose]

18  srvctl upgrade

18.1  srvctl upgrade database -db <db_unique_name> -oraclehome <oracle_home>

19  srvctl downgrade

19.1  srvctl downgrade database -db <db_unique_name> -oraclehome <oracle_home> -targetversion <to_version>

20  srvctl predict

 

20.1  srvctl predict database -db <database_name> [-verbose]

 

20.2  srvctl predict service -db <database_name> -service <service_name> [-verbose]

20.3  srvctl predict asm [-node <node_name>] [-verbose]

 

[root@oracle1 ~]# srvctl predict asm

Resource ora.asm will be stopped

Resource ora.mgmtdb will be stopped

Resource ora.DATA.dg will be stopped

Resource ora.MGMTLSNR will be started on node oracle1

Resource ora.mgmtdb will be stopped

Resource ora.mgmtdb will be started on node oracle1

20.4  srvctl predict diskgroup -diskgroup <diskgroup_name> [-verbose]

 

[root@oracle1 ~]# srvctl predict diskgroup -diskgroup DATA

Resource ora.DATA.dg will be stopped

20.5  srvctl predict filesystem -device <volume_device> [-verbose]

20.6  srvctl predict vip -vip <vip_name> [-verbose]

 

[root@oracle1 ~]# srvctl predict vip -vip oracle1-vip

VIP oracle1 will be started on node oracle2

Listener LISTENER will be stopped

 

 

[root@oracle1 ~]# srvctl predict vip -vip oracle2-vip

VIP oracle2 will be started on node oracle1

Listener LISTENER will be stopped

20.7  srvctl predict network [-netnum <network_number>] [-verbose]

# Predicts the consequences of network failure.

 

[root@oracle1 ~]# srvctl predict network -netnum 1

Listener LISTENER will be stopped

Listener LISTENER_SCAN1 will be stopped

Network number 1 will be started on node oracle1

Network number 1 will be stopped

Resource ora.cvu will be started on node oracle1

Resource ora.ons will be stopped

VIP oracle1 will be started on nodes oracle2,oracle1

VIP oracle2 will be started on node oracle1

VIP scan1 will be started on node oracle1

Listener LISTENER_SCAN1 will be started on node oracle1

VIP scan1 will be stopped

Resource ora.ons will be started on node oracle1

Listener LISTENER will be started on node oracle1

20.8  srvctl predict listener -listener <listener_name> [-verbose]

 

[root@oracle1 ~]# srvctl predict listener -listener LISTENER

Listener LISTENER will be stopped

20.9  srvctl predict scan -scannumber <scan_ordinal_number> [-netnum <network_number>] [-verbose]

 

[root@oracle1 ~]# srvctl predict scan -scannumber 1

VIP scan1 will be started on node oracle1

Listener LISTENER_SCAN1 will be started on node oracle1

20.10 srvctl predict scan_listener -scannumber <scan_ordinal_number> [-netnum <network_number>] [-verbose]

 

[root@oracle1 ~]# srvctl predict scan_listener -scannumber 1

Listener LISTENER_SCAN1 will be started on node oracle1

VIP scan1 will be started on node oracle1

posted @ 2021-07-05 11:35  雪竹子  阅读(929)  评论(0编辑  收藏  举报