当前位置:操作系统 > Unix/Linux >>

srvctl常用查看与停库命令

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 <
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,