Quantcast
Channel: CSDN博客推荐文章
Viewing all articles
Browse latest Browse all 35570

srvctl常用查看与停库命令

$
0
0

srvctl常用查看与其停库命令

 

检查节点应用程序状态

[grid@db1 ~]$ srvctl status nodeapps

VIP db1vip is enabled

VIP db1vip is running on node: db1

VIP db2vip is enabled

VIP db2vip is running on node: db2

Network is enabled

Network is running on node: db1

Network is running on node: db2

GSD is disabled

GSD is not running on node: db1

GSD is not running on node: db2

ONS is enabled

ONS daemon is running on node: db1

ONS daemon is running on node: db2

 


检查节点vip状态及配置

[grid@db1 ~]$ srvctl status vip -n db1

VIP db1vip is enabled

VIP db1vip is running on node: db1

[grid@db1 ~]$ srvctl status vip -n db2

VIP db2vip is enabled

VIP db2vip is running on node: db2

 

 [grid@db1 ~]$ srvctl config vip -n db1

VIP exists: /db1vip/10.200.0.105/10.200.0.0/255.255.255.0/eth0, hosting node db1

[grid@db1 ~]$ srvctl config vip -n db2

VIP exists: /db2vip/10.200.0.107/10.200.0.0/255.255.255.0/eth0, hosting node db2

 

检查节点监听与监听配置

[grid@db1 ~]$ srvctl status listener

Listener LISTENER is enabled

Listener LISTENER is running on node(s): db1,db2

grid@db1 ~]$ srvctl config listener -a

Name: LISTENER

Network: 1, Owner: grid

Home: <CRS home>

  /u01/app/11.2.0/grid on node(s) db2,db1

End points: TCP:1521

 

 

检查数据库实例状态

[grid@db1 ~]$ srvctl status database -d dmzdb

Instance dmzdb1 is running on node db1

Instance dmzdb2 is running on node db2

[grid@db1 ~]$ srvctl status instance -d dmzdb -i dmzdb1,dmzdb2

Instance dmzdb1 is running on node db1

Instance dmzdb2 is running on node db2

 

数据库配置

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

Database unique name: dmzdb

Database name: dmzdb

Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1

Oracle user: oracle

Spfile: +DATA/dmzdb/spfiledmzdb.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: dmzdb

Database instances: dmzdb1,dmzdb2

Disk Groups: DATA

Mount point paths:

Services:

Type: RAC

Database is enabled

Database is administrator managed

 

 

 

asm状态及配置

[grid@db1 ~]$ srvctl status asm

ASM is running on db1,db2

[grid@db1 ~]$ srvctl config asm -a

ASM home: /u01/app/11.2.0/grid

ASM listener: LISTENER

ASM is enabled.

 

scan状态及配置

[grid@db1 ~]$ srvctl status scan

SCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node db1

grid@db1 ~]$ srvctl config scan

SCAN name: dbscan, Network: 1/10.200.0.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /dbscan/10.200.0.109

 

 

停止db1监听

[grid@db1 ~]$ srvctl stop listener -n db1

[grid@db1 ~]$ srvctl status listener -n db1

Listener LISTENER is enabled on node(s): db1

Listener LISTENER is not running on node(s): db1

 

 

停实例db1

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

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

Instance dmzdb1 is not running on node db1

Instance dmzdb1 is not running on node db1

 

启动db1实例

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

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

Instance dmzdb1 is running on node db1

 

启动db1监听

[grid@db1 ~]$ srvctl start listener -n db1

[grid@db1 ~]$ srvctl status listener -n db1

Listener LISTENER is enabled on node(s): db1

Listener LISTENER is running on node(s): db1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

srvctl 查看帮助   -h

[grid@db1 ~]$ 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 oc4j [-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@db1 ~]$ srvctl start -h

The SRVCTL start command starts, Oracle Clusterware enabled, non-running 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 oc4j [-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@db1 ~]$ 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 oc4j [-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

 

作者:xyy27 发表于2013-9-24 15:18:25 原文链接
阅读:14 评论:0 查看评论

Viewing all articles
Browse latest Browse all 35570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>