电脑故障

位置:IT落伍者 >> 电脑故障 >> 浏览文章

srvctl常用查看与停库命令


发布日期:2021/9/21
 

检查节点应用程序状态

[grid@db ~]$ srvctl status nodeapps

VIP dbvip is enabled

VIP dbvip is running on node: db

VIP dbvip is enabled

VIP dbvip is running on node: db

Network is enabled

Network is running on node: db

Network is running on node: db

GSD is disabled

GSD is not running on node: db

GSD is not running on node: db

ONS is enabled

ONS daemon is running on node: db

ONS daemon is running on node: db

检查节点vip状态及配置

[grid@db ~]$ srvctl status vip n db

VIP dbvip is enabled

VIP dbvip is running on node: db

[grid@db ~]$ srvctl status vip n db

VIP dbvip is enabled

VIP dbvip is running on node: db

[grid@db ~]$ srvctl config vip n db

VIP exists: /dbvip////eth hosting node db

[grid@db ~]$ srvctl config vip n db

VIP exists: /dbvip////eth hosting node db

检查节点监听与监听配置

[grid@db ~]$ srvctl status listener

Listener LISTENER is enabled

Listener LISTENER is running on node(s) dbdb

grid@db ~]$ srvctl config listener a

Name: LISTENER

Network: Owner: grid

Home: <CRS home>

/u/app//grid on node(s) dbdb

End points: TCP:

检查数据库实例状态

[grid@db ~]$ srvctl status database d dmzdb

Instance dmzdb is running on node db

Instance dmzdb is running on node db

[grid@db ~]$ srvctl status instance d dmzdb i dmzdbdmzdb

Instance dmzdb is running on node db

Instance dmzdb is running on node db

数据库配置

[grid@db ~]$ srvctl config database d dmzdb a

Database unique name: dmzdb

Database name: dmzdb

Oracle home: /u/app/oracle/product//dbhome_

Oracle user: oracle

Spfile: +DATA/dmzdb/spfiledmzdbora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: dmzdb

Database instances: dmzdbdmzdb

Disk Groups: DATA

Mount point paths:

Services:

Type: RAC

Database is enabled

Database is administrator managed

asm状态及配置

[grid@db ~]$ srvctl status asm

ASM is running on dbdb

[grid@db ~]$ srvctl config asm a

ASM home: /u/app//grid

ASM listener: LISTENER

ASM is enabled

scan状态及配置

[grid@db ~]$ srvctl status scan

SCAN VIP scan is enabled

SCAN VIP scan is running on node db

grid@db ~]$ srvctl config scan

SCAN name: dbscan Network: ///eth

SCAN VIP name: scan IP: /dbscan/

停止db监听

[grid@db ~]$ srvctl stop listener n db

[grid@db ~]$ srvctl status listener n db

Listener LISTENER is enabled on node(s) db

Listener LISTENER is not running on node(s) db

停实例db

[grid@db ~]$ srvctl stop instance d dmzdb n db

[grid@db ~]$ srvctl status instance d dmzdb n db

Instance dmzdb is not running on node db

Instance dmzdb is not running on node db

启动db实例

[grid@db ~]$ srvctl start instance d dmzdb n db

[grid@db ~]$ srvctl status instance d dmzdb n db

Instance dmzdb is running on node db

启动db监听

[grid@db ~]$ srvctl start listener n db

[grid@db ~]$ srvctl status listener n db

Listener LISTENER is enabled on node(s) db

Listener LISTENER is running on node(s) db

srvctl 查看帮助 h

[grid@db ~]$ srvctl status h

The SRVCTL status command displays the current state of the object

Usage: srvctl status database d <db_unique_name> [f] [v]

Usage: srvctl status instance d <db_unique_name> {n <node_name> | i <inst_name_list>} [f] [v]

Usage: srvctl status service d <db_unique_name> [s <service_name_list>] [f] [v]

Usage: srvctl status nodeapps

Usage: srvctl status vip { n <node_name> | i <vip_name> } [v]

Usage: srvctl status listener [l <lsnr_name>] [n <node_name>] [v]

Usage: srvctl status asm [n <node_name>] [a] [v]

Usage: srvctl status scan [i <ordinal_number>] [v]

Usage: srvctl status scan_listener [i <ordinal_number>] [v]

Usage: srvctl status srvpool [g <pool_name>] [a]

Usage: srvctl status server n <server_list> [a]

Usage: srvctl status ocj [n <node_name>] [v]

Usage: srvctl status home o <oracle_home> s <state_file> n <node_name>

Usage: srvctl status filesystem d <volume_device> [v]

Usage: srvctl status diskgroup g <dg_name> [n <node_list>] [a] [v]

Usage: srvctl status cvu [n <node_name>]

Usage: srvctl status gns [n <node_name>] [v]

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

srvctl <command> <object> h

[grid@db ~]$ srvctl start h

The SRVCTL start command starts Oracle Clusterware enabled nonrunning objects

Usage: srvctl start database d <db_unique_name> [o <start_options>] [n <node>]

Usage: srvctl start instance d <db_unique_name> {n <node_name> [i <inst_name>] | i <inst_name_list>} [o <start_options>]

Usage: srvctl start service d <db_unique_name> [s <service_name_list> [n <node_name> | i <inst_name>] ] [o <start_options>]

Usage: srvctl start nodeapps [n <node_name>] [g] [v]

Usage: srvctl start vip { n <node_name> | i <vip_name> } [v]

Usage: srvctl start asm [n <node_name>] [o <start_options>]

Usage: srvctl start listener [l <lsnr_name>] [n <node_name>]

Usage: srvctl start scan [i <ordinal_number>] [n <node_name>]

Usage: srvctl start scan_listener [n <node_name>] [i <ordinal_number>]

Usage: srvctl start ocj [v]

Usage: srvctl start home o <oracle_home> s <state_file> n <node_name>

Usage: srvctl start filesystem d <volume_device> [n <node_name>]

Usage: srvctl start diskgroup g <dg_name> [n <node_list>]

Usage: srvctl start gns [l <log_level>] [n <node_name>] [v]

Usage: srvctl start cvu [n <node_name>]

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

srvctl <command> <object> h

[grid@db ~]$ srvctl stop h

The SRVCTL stop command stops Oracle Clusterware enabled starting or running objects

Usage: srvctl stop database d <db_unique_name> [o <stop_options>] [f]

Usage: srvctl stop instance d <db_unique_name> {n <node_name> | i <inst_name_list>} [o <stop_options>] [f]

Usage: srvctl stop service d <db_unique_name> [s <service_name_list> [n <node_name> | i <inst_name>] ] [f]

Usage: srvctl stop nodeapps [n <node_name>] [g] [f] [r] [v]

Usage: srvctl stop vip { n <node_name> | i <vip_name> } [f] [r] [v]

Usage: srvctl stop asm [n <node_name>] [o <stop_options>] [f]

Usage: srvctl stop listener [l <lsnr_name>] [n <node_name>] [f]

Usage: srvctl stop scan [i <ordinal_number>] [f]

Usage: srvctl stop scan_listener [i <ordinal_number>] [f]

Usage: srvctl stop ocj [f] [v]

Usage: srvctl stop home o <oracle_home> s <state_file> n <node_name> [t <stop_options>] [f]

Usage: srvctl stop filesystem d <volume_device> [n <node_name>] [f]

Usage: srvctl stop diskgroup g <dg_name> [n <node_list>] [f]

Usage: srvctl stop gns [n <node_name>] [f] [v]

Usage: srvctl stop cvu [f]

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

srvctl <command> <object> h

上一篇:ORA-xxxxxx/RMAN-xxxxx

下一篇:各种索引的结构分析降序索引和位图索引