设为首页 收藏本站
查看: 630|回复: 0

[经验分享] Oracle 11gR2 RAC 常用维护操作 说明

[复制链接]

尚未签到

发表于 2016-7-22 07:06:35 | 显示全部楼层 |阅读模式
  

  
  
  
  之前整理了2篇Oracle 10gRAC的启动与关闭相关的文章,参考:
  Oracle 10gRAC 启动与关闭
  http://blog.csdn.net/tianlesoftware/article/details/5349003
  
  Oracle RAC 常用维护工具和命令
  http://blog.csdn.net/tianlesoftware/article/details/5358573
  
一.启动和停止集群
  在Oracle 11gR2 下的RAC,架构发生了变化。CRS的信息也是放在ASM 实例里的,所以要关asm,必须关闭crs, 如果还使用了acfs的话,一关crs那么acfs里的信息也不能访问了,所以一般不重启机器,不轻易关crs, 其他的service可以根据自己的需要去stop/start。
  
  注意:
  11g RAC 开启资源相对比较慢(即使命令后面显示的资源都start succeeded,通过crs_stat -t查看都不一定online), 需要耐心并查看log。
  
  在Oracle 11gR2 里引入了Oracle Restart的特性,其用来管理Cluster Resource。关于Oracle Restart,参考我的Blog:
  Oracle 11g 新特性 -- Oracle Restart 说明
  http://blog.csdn.net/tianlesoftware/article/details/8435670
  
1.1 使用crsctl stop has/crsctl stopcrs
  用root用户,在Oracle11gR2中停止和启动集群的命令如下:
  #crsctl stop has [-f]
  #crsctl start has
  
  注意:
  对于crsctl stop has 只有一个可选的参数就是-f,该命令只能停执行该命令服务器上的HAS.而不能停所有节点上的。所以要把RAC 全部停掉,需要在所有节点执行该命令。
  
  下面的2个命令:使用crs 和 使用has 效果是完全一样的:
  #crsctl stop crs [-f]
  #crsctl start crs
  
  
  示例:
  --停止HAS
  [iyunv@rac1 bin]# ./crsctl stophas
  CRS-2791:Starting shutdown of Oracle High Availability Services-managed resources on'rac1'
  CRS-2673:Attempting to stop 'ora.crsd' on 'rac1'
  CRS-2790:Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
  CRS-2673:Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac1'
  CRS-2673:Attempting to stop 'ora.OCRVOTING.dg' on 'rac1'
  CRS-2673:Attempting to stop 'ora.sdd.db' on 'rac1'
  CRS-2673:Attempting to stop 'ora.LISTENER.lsnr' on 'rac1'
  CRS-2673:Attempting to stop 'ora.oc4j' on 'rac1'
  CRS-2673:Attempting to stop 'ora.cvu' on 'rac1'
  CRS-2677: Stopof 'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.scan1.vip' on 'rac1'
  CRS-2677: Stopof 'ora.LISTENER.lsnr' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.rac1.vip' on 'rac1'
  CRS-2677: Stopof 'ora.rac1.vip' on 'rac1' succeeded
  CRS-2672:Attempting to start 'ora.rac1.vip' on 'rac2'
  CRS-2677: Stopof 'ora.scan1.vip' on 'rac1' succeeded
  CRS-2672:Attempting to start 'ora.scan1.vip' on 'rac2'
  CRS-2676:Start of 'ora.scan1.vip' on 'rac2' succeeded
  CRS-2676:Start of 'ora.rac1.vip' on 'rac2' succeeded
  CRS-2672:Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'rac2'
  CRS-2677: Stopof 'ora.sdd.db' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.DATA.dg' on 'rac1'
  CRS-2673:Attempting to stop 'ora.FRA.dg' on 'rac1'
  CRS-2676:Start of 'ora.LISTENER_SCAN1.lsnr' on 'rac2' succeeded
  CRS-2677: Stopof 'ora.FRA.dg' on 'rac1' succeeded
  CRS-2677: Stopof 'ora.DATA.dg' on 'rac1' succeeded
  CRS-2677: Stopof 'ora.oc4j' on 'rac1' succeeded
  CRS-2672:Attempting to start 'ora.oc4j' on 'rac2'
  CRS-2677: Stopof 'ora.cvu' on 'rac1' succeeded
  CRS-2672:Attempting to start 'ora.cvu' on 'rac2'
  CRS-2676:Start of 'ora.cvu' on 'rac2' succeeded
  CRS-2677: Stopof 'ora.OCRVOTING.dg' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.asm' on 'rac1'
  CRS-2677: Stopof 'ora.asm' on 'rac1' succeeded
  CRS-2676:Start of 'ora.oc4j' on 'rac2' succeeded
  CRS-2673:Attempting to stop 'ora.ons' on 'rac1'
  CRS-2677: Stopof 'ora.ons' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.net1.network' on 'rac1'
  CRS-2677: Stopof 'ora.net1.network' on 'rac1' succeeded
  CRS-2792:Shutdown of Cluster Ready Services-managed resources on 'rac1' has completed
  CRS-2677: Stopof 'ora.crsd' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.mdnsd' on 'rac1'
  CRS-2673:Attempting to stop 'ora.ctssd' on 'rac1'
  CRS-2673:Attempting to stop 'ora.evmd' on 'rac1'
  CRS-2673:Attempting to stop 'ora.asm' on 'rac1'
  CRS-2677: Stopof 'ora.evmd' on 'rac1' succeeded
  CRS-2677: Stopof 'ora.mdnsd' on 'rac1' succeeded
  CRS-2677: Stopof 'ora.ctssd' on 'rac1' succeeded
  CRS-2677: Stopof 'ora.asm' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.cluster_interconnect.haip' on 'rac1'
  CRS-2677: Stopof 'ora.cluster_interconnect.haip' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.cssd' on 'rac1'
  CRS-2677: Stopof 'ora.cssd' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.crf' on 'rac1'
  CRS-2677: Stopof 'ora.crf' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.gipcd' on 'rac1'
  CRS-2677: Stopof 'ora.gipcd' on 'rac1' succeeded
  CRS-2673:Attempting to stop 'ora.gpnpd' on 'rac1'
  CRS-2677: Stopof 'ora.gpnpd' on 'rac1' succeeded
  CRS-2793:Shutdown of Oracle High Availability Services-managed resources on 'rac1' hascompleted
  CRS-4133:Oracle High Availability Services has been stopped.
  [iyunv@rac1bin]#
  
  注意:
   我这里测试的是Oracle11gR2的环境,我们在节点1上执行该命令,只把节点1上的进程停了,而把相关的资源转移到我们的节点2上了,因此也证实了我们上面的说的,该命令只争对当前服务器有效。
  
  --启动HAS
  [iyunv@rac1bin]# ./crsctl start has
  CRS-4123:Oracle High Availability Services has been started.
  [iyunv@rac1bin]#
  
  从上面看只是启动了HAS。实际上后面会把Oracle Restart 管理的资源都会启动。这个可以使用crs_stat命令来进程验证,不过Oracle 11g的进程启动过程比较慢,需要耐心等待。
  
  [iyunv@rac1u01]# sh crs_stat.sh
  Name Target StateHost
  ---------------------------------------- --------- -------
  ora.DATA.dg ONLINE ONLINErac1
  ora.FRA.dg ONLINE ONLINErac1
  ora.LISTENER.lsnr ONLINE ONLINErac1
  ora.LISTENER_SCAN1.lsnr ONLINE ONLINErac2
  ora.OCRVOTING.dg ONLINE ONLINErac1
  ora.asm ONLINE ONLINErac1
  ora.cvu ONLINE ONLINErac2
  ora.gsd OFFLINE OFFLINE
  ora.net1.network ONLINE ONLINErac1
  ora.oc4j ONLINE ONLINErac2
  ora.ons ONLINE ONLINErac1
  ora.rac1.ASM1.asm ONLINE ONLINErac1
  ora.rac1.LISTENER_RAC1.lsnr ONLINEONLINE rac1
  ora.rac1.gsd OFFLINE OFFLINE
  ora.rac1.ons ONLINE ONLINErac1
  ora.rac1.vip ONLINE ONLINErac1
  ora.rac2.ASM2.asm ONLINE ONLINErac2
  ora.rac2.LISTENER_RAC2.lsnr ONLINEONLINE rac2
  ora.rac2.gsd OFFLINE OFFLINE
  ora.rac2.ons ONLINE ONLINErac2
  ora.rac2.vip ONLINE ONLINErac2
  ora.scan1.vip ONLINE ONLINErac2
  ora.sdd.db ONLINE ONLINErac2
  
  
1.2 使用crsctl stop cluster [-all]…
  该命令的语法如下:
  crsctl stop cluster [[-all]|[-n<server>[...]]] [-f]
  crsctl start cluster [[-all]|[-n<server>[...]]]
  
  与1.1 节最大的不同,该参数支持的选项更多,可以同时操控所有的节点。如果不指定参数,那么只对当前节点有效。
  
  如:
  [iyunv@rac1 ~]# ./crsctl start cluster -n rac1 rac2
  
  --停止当前节点集群:
  [iyunv@rac1 bin]# ./crsctl stop cluster
  CRS-2673: Attempting to stop 'ora.crsd' on'rac1'
  CRS-2790: Starting shutdown of ClusterReady Services-managed resources on 'rac1'
  CRS-2673: Attempting to stop'ora.LISTENER.lsnr' on 'rac1'
  CRS-2673: Attempting to stop'ora.OCRVOTING.dg' on 'rac1'
  CRS-2673: Attempting to stop 'ora.sdd.db'on 'rac1'
  CRS-2677: Stop of 'ora.LISTENER.lsnr' on'rac1' succeeded
  CRS-2673: Attempting to stop 'ora.rac1.vip'on 'rac1'
  CRS-2677: Stop of 'ora.rac1.vip' on 'rac1'succeeded
  CRS-2672: Attempting to start'ora.rac1.vip' on 'rac2'
  CRS-2677: Stop of 'ora.sdd.db' on 'rac1'succeeded
  CRS-2673: Attempting to stop 'ora.DATA.dg'on 'rac1'
  CRS-2673: Attempting to stop 'ora.FRA.dg'on 'rac1'
  CRS-2676: Start of 'ora.rac1.vip' on 'rac2'succeeded
  CRS-2677: Stop of 'ora.FRA.dg' on 'rac1'succeeded
  CRS-2677: Stop of 'ora.DATA.dg' on 'rac1'succeeded
  CRS-2677: Stop of 'ora.OCRVOTING.dg' on'rac1' succeeded
  CRS-2673: Attempting to stop 'ora.asm' on'rac1'
  CRS-2677: Stop of 'ora.asm' on 'rac1'succeeded
  CRS-2673: Attempting to stop 'ora.ons' on'rac1'
  CRS-2677: Stop of 'ora.ons' on 'rac1'succeeded
  CRS-2673: Attempting to stop'ora.net1.network' on 'rac1'
  CRS-2677: Stop of 'ora.net1.network' on'rac1' succeeded
  CRS-2792: Shutdown of Cluster ReadyServices-managed resources on 'rac1' has completed
  CRS-2677: Stop of 'ora.crsd' on 'rac1'succeeded
  CRS-2673: Attempting to stop 'ora.ctssd' on'rac1'
  CRS-2673: Attempting to stop 'ora.evmd' on'rac1'
  CRS-2673: Attempting to stop 'ora.asm' on'rac1'
  CRS-2677: Stop of 'ora.evmd' on 'rac1'succeeded
  CRS-2677: Stop of 'ora.ctssd' on 'rac1'succeeded
  CRS-2677: Stop of 'ora.asm' on 'rac1'succeeded
  CRS-2673: Attempting to stop'ora.cluster_interconnect.haip' on 'rac1'
  CRS-2677: Stop of'ora.cluster_interconnect.haip' on 'rac1' succeeded
  CRS-2673: Attempting to stop 'ora.cssd' on'rac1'
  CRS-2677: Stop of 'ora.cssd' on 'rac1'succeeded
  [iyunv@rac1 bin]#
  
  这里只停了节点1,相关进程全飘到节点2了,如下:
  [iyunv@rac2 u01]# sh crs_stat.sh
  Name Target StateHost
  ------------------------------ ------------------- -------
  ora.DATA.dg ONLINE ONLINErac2
  ora.FRA.dg ONLINE ONLINErac2
  ora.LISTENER.lsnr ONLINE ONLINErac2
  ora.LISTENER_SCAN1.lsnr ONLINE ONLINErac2
  ora.OCRVOTING.dg ONLINE ONLINErac2
  ora.asm ONLINE ONLINErac2
  ora.cvu ONLINE ONLINErac2
  ora.gsd OFFLINE OFFLINE
  ora.net1.network ONLINE ONLINErac2
  ora.oc4j ONLINE ONLINErac2
  ora.ons ONLINE ONLINErac2
  ora.rac1.ASM1.asm ONLINE OFFLINE
  ora.rac1.LISTENER_RAC1.lsnr ONLINEOFFLINE
  ora.rac1.gsd OFFLINE OFFLINE
  ora.rac1.ons ONLINE OFFLINE
  ora.rac1.vip ONLINE ONLINErac2
  ora.rac2.ASM2.asm ONLINE ONLINErac2
  ora.rac2.LISTENER_RAC2.lsnr ONLINEONLINE rac2
  ora.rac2.gsd OFFLINE OFFLINE
  ora.rac2.ons ONLINE ONLINErac2
  ora.rac2.vip ONLINE ONLINErac2
  ora.scan1.vip ONLINE ONLINErac2
  ora.sdd.db ONLINE ONLINErac2
  
  --启用当前节点:
  [iyunv@rac1 bin]#./crsctl start cluster
  CRS-2672: Attempting to start'ora.cssdmonitor' on 'rac1'
  CRS-2676: Start of 'ora.cssdmonitor' on'rac1' succeeded
  CRS-2672: Attempting to start 'ora.cssd' on'rac1'
  CRS-2672: Attempting to start 'ora.diskmon'on 'rac1'
  CRS-2676: Start of 'ora.diskmon' on 'rac1'succeeded
  CRS-2676: Start of 'ora.cssd' on 'rac1'succeeded
  CRS-2672: Attempting to start 'ora.ctssd'on 'rac1'
  CRS-2672: Attempting to start'ora.cluster_interconnect.haip' on 'rac1'
  CRS-2676: Start of 'ora.ctssd' on 'rac1'succeeded
  CRS-2672: Attempting to start 'ora.evmd' on'rac1'
  CRS-2676: Start of 'ora.evmd' on 'rac1'succeeded
  CRS-2676: Start of'ora.cluster_interconnect.haip' on 'rac1' succeeded
  CRS-2672: Attempting to start 'ora.asm' on'rac1'
  CRS-2676: Start of 'ora.asm' on 'rac1'succeeded
  CRS-2672: Attempting to start 'ora.crsd' on'rac1'
  CRS-2676: Start of 'ora.crsd' on 'rac1'succeeded
  [iyunv@rac1 bin]#
  
1.3 检查集群的状态
  
  --简单的输出:
  [iyunv@rac1 bin]# ./crsctl check cluster
  [iyunv@rac1 bin]# ./crsctl check crs
  
  --详细的信息:
  # crs_stat -t
  
  
  使用crsctl check crs命令,如下:
  [iyunv@rac1 bin]# ./crsctl check crs
  CRS-4638: Oracle High Availability Servicesis online
  CRS-4537: Cluster Ready Services is online
  CRS-4529: Cluster Synchronization Servicesis online
  CRS-4533: Event Manager is online
  
  [iyunv@rac1 bin]# ./crsctl check cluster
  CRS-4537: Cluster Ready Services is online
  CRS-4529: Cluster Synchronization Servicesis online
  CRS-4533: Event Manager is online
  
二.停止和启动Resource
  在第一节中,看到直接停止集群,相关的Resource 也会被停止。 但一些实际情况下,我们操作更多的是对某些资源的操作。具体就是使用SRVCTL 命令
  
1.1. 官网说明
  SRVCTL Command Reference for Oracle Restart
  http://docs.oracle.com/cd/E11882_01/server.112/e25494/restart005.htm
  
  查看命令帮助:
  Srvclt –h
  
  这个命令显示的结果太长,不好查看,可以进一步的查看帮助:
  
  --使用-h
  [grid@rac1 ~]$ srvctl start -h
  
  The SRVCTL start command starts, OracleClusterware 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 andobject and its options use:
  srvctl <command> <object> -h
  
  --或者命令不敲全:
  [grid@rac1 ~]$ srvctl database
  Usage: srvctl <command><object> [<options>]
  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 andobject and its options use:
  srvctl <command> -h or
  srvctl <command> <object> -h
  
1.2 示例
1.2.1 检查集群状态
  [grid@rac1 ~]$ crsctl check cluster
  CRS-4537: Cluster Ready Services is online
  CRS-4529: Cluster Synchronization Servicesis online
  CRS-4533: Event Manager is online
  
1.2.2 所有Oracle实例(数据库状态)
  [grid@rac1 ~]$ srvctl status database -dsdd
  Instance sdd1 is running on node rac1
  Instance sdd2 is running on node rac2
  
1.2.3 检查单个实例状态
  [grid@rac1 ~]$ srvctl status instance -dsdd -i sdd1
  Instance sdd1 is running on node rac1
  [grid@rac1 ~]$
  
1.2.4节点应用程序状态
  [grid@rac1 ~]$ srvctl status nodeapps
  VIP rac1-vip is enabled
  VIP rac1-vip is running on node: rac1
  VIP rac2-vip is enabled
  VIP rac2-vip is running on node: rac2
  Network is enabled
  Network is running on node: rac1
  Network is running on node: rac2
  GSD is disabled
  GSD is not running on node: rac1
  GSD is not running on node: rac2
  ONS is enabled
  ONS daemon is running on node: rac1
  ONS daemon is running on node: rac2
  
  
1.2.5 列出所有的配置数据库
  [grid@rac1 ~]$ srvctl config database
  sdd
  
1.2.6 数据库配置
  [grid@rac1 ~]$ srvctl config database -dsdd -a
  Database unique name: sdd
  Database name: sdd
  Oracle home: /u01/app/oracle/11.2.0/db_1
  Oracle user: oracle
  Spfile: +DATA/sdd/spfilesdd.ora
  Domain:
  Start options: open
  Stop options: immediate
  Database role: PRIMARY
  Management policy: AUTOMATIC
  Server pools: sdd
  Database instances: sdd1,sdd2
  Disk Groups: DATA,FRA
  Mount point paths:
  Services:
  Type: RAC
  Database is enabled
  Database is administrator managed
  
1.2.7 ASM状态以及ASM配置
  [grid@rac1 ~]$ srvctl status asm
  ASM is running on rac2,rac1
  
  [grid@rac1 ~]$ srvctl status asm -a
  ASM is running on rac2,rac1
  ASM is enabled.
  
1.2.8 TNS监听器状态以及配置
  [grid@rac1 ~]$ srvctl status listener
  Listener LISTENER is enabled
  Listener LISTENER is running on node(s):rac2,rac1
  
  [grid@rac1 ~]$ srvctl config listener -a
  Name: LISTENER
  Network: 1, Owner: grid
  Home: <CRS home>
  /u01/app/grid/11.2.0 on node(s) rac2,rac1
  End points: TCP:1521
  
  
1.2.8 SCAN状态以及配置
  [grid@rac1 ~]$ srvctl status scan
  SCAN VIP scan1 is enabled
  SCAN VIP scan1 is running on node rac1
  
  [grid@rac1 ~]$ srvctl config scan
  SCAN name: rac-scan, Network:1/192.168.16.0/255.255.255.0/eth0
  SCAN VIP name: scan1, IP:/rac-scan/192.168.16.207
  
1.2.9 VIP各个节点的状态以及配置
  [grid@rac1 ~]$ srvctl status vip -n rac1
  VIP rac1-vip is enabled
  VIP rac1-vip is running on node: rac1
  
  [grid@rac1 ~]$ srvctl status vip -n rac2
  VIP rac2-vip is enabled
  VIP rac2-vip is running on node: rac2
  
  [grid@rac1 ~]$ srvctl config vip -n rac1
  VIP exists: /rac1-vip/192.168.16.201/192.168.16.0/255.255.255.0/eth0,hosting node rac1
  
  [grid@rac1 ~]$ srvctl config vip -n rac2
  VIP exists:/rac2-vip/192.168.16.203/192.168.16.0/255.255.255.0/eth0, hosting node rac2
  [grid@rac1 ~]$
  
1.2.10 节点应用程序配置(VIP、GSD、ONS、监听器)
  [grid@rac1 ~]$ srvctl config nodeapps -a -g-s -l
  Warning:-l option has been deprecated andwill be ignored.
  Network exists:1/192.168.16.0/255.255.255.0/eth0, type static
  VIP exists:/rac1-vip/192.168.16.201/192.168.16.0/255.255.255.0/eth0, hosting node rac1
  VIP exists:/rac2-vip/192.168.16.203/192.168.16.0/255.255.255.0/eth0, hosting node rac2
  GSD exists
  ONS exists: Local port 6100, remote port6200, EM port 2016
  Name: LISTENER
  Network: 1, Owner: grid
  Home: <CRS home>
  /u01/app/grid/11.2.0 on node(s) rac2,rac1
  End points: TCP:1521
  
1.3 语法简汇
1.3.1 数据库与实例
  srvctl config database # 列出安装的数据库
srvctl config database -d rac -a # 检查数据库相关的信息
srvctlstatus database -d RAC # 检查数据库的状态
srvctl status instance -d RAC -i rac1 # 检查指定实例的状态

srvctl config asm -a # ASM配置
srvctl status asm # ASM的状态

srvctl start database -d rac # 启动数据库
srvctl stop database -d rac # 关闭数据库

srvctl start instance -d rac -i rac1 # 启动指定的实例
srvctl stop instance -d rac -i rac2 # 关闭指定实例
  
1.3.2 网络相关的命令
  
  srvctl status listener # 检查TNS listener的状态
srvctl config scan # SCAN的配置
srvctl status scan # SCAN listener状态, 包含当前运行节点的信息

# 检查VIP的配置及状态
srvctl status vip -n rac1
srvctl config vip -n rac1
  
1.3.3 查看各资源状态(nodeapps节点应用程序,ASM实例,数据库等)
  
  [iyunv@db02 u01]# crs_stat -t
  Name Type TargetState Host
  ------------------------------------------------------------
  ora.DATA.dg ora....up.type ONLINE ONLINEdb02
  ora.FRA.dg ora....up.type ONLINE ONLINEdb02
  ora....ER.lsnr ora....er.type ONLINE ONLINEdb02
  ora....N1.lsnr ora....er.type ONLINE ONLINEdb02
  ora....N2.lsnr ora....er.type ONLINE ONLINEdb02
  ora....N3.lsnr ora....er.type ONLINE ONLINEdb02
  ora.OCR.dg ora....up.type ONLINE ONLINEdb02
  ora.asmora.asm.type ONLINEONLINE db02
  ora....-01.vip ora....t1.type ONLINE ONLINEdb02
  ora....SM2.asm application ONLINEONLINE db02
  ora....02.lsnr application ONLINEONLINE db02
  ora....-02.gsd application OFFLINEOFFLINE
  ora....-02.ons application ONLINEONLINE db02
  ora....-02.vip ora....t1.type ONLINE ONLINEdb02
  ora.cvu ora.cvu.type ONLINEONLINE db02
  ora.gsd ora.gsd.type OFFLINEOFFLINE
  ora....network ora....rk.type ONLINE ONLINEdb02
  ora.oc4j ora.oc4j.type ONLINEONLINE db02
  ora.ons ora.ons.type ONLINEONLINE db02
  ora.orcl.db ora....se.type ONLINE ONLINEdb02
  ora....taf.svc ora....ce.type ONLINE ONLINEdb02
  ora.scan1.vip ora....ip.type ONLINE ONLINEdb02
  ora.scan2.vip ora....ip.type ONLINE ONLINEdb02
  ora.scan3.vip ora....ip.type ONLINE ONLINEdb02
  
  在11g R2中,默认 oc4j和gsd资源是 disable的;oc4j 是用于WLM 的一个资源, WLM在 11.2.0.2 才可用;gsd是 CRS 用于跟 9i RAC 进行通信的一个模块,是为了向后兼容才保留的,不影响性能;建议不要刪除, 也不要尝试开启他们, 忽略即可。
  
  ora.gsdis OFFLINE by default ifthere is no 9i database in the cluster.
  ora.oc4j is OFFLINE in 11.2.0.1 as DatabaseWorkload Management(DBWLM) is unavailable.these can be ignored in11gR2 RAC.
  
  状态检查也可以使用如下命令:
  crsctl stat resource –t
  或者
  crsctl stat resource
  
  更多内容参考:
  Oracle 11gR2RAC 进程说明
  http://blog.csdn.net/tianlesoftware/article/details/6009962
  
1.3.4 综合
  1、通过SRVCTL命令来start/stop/check所有的实例:
  srvctl start|stop|status database -d<db_name>
  
  2、start/stop指定的实例:
  srvctl start|stop|statusinstance -d <db_name> -i <instance_name>
  
  3、列出当前RAC下所有的
  srvctl config database -d <db_name>
  
  4、start/stop/check 所有的nodeapps,比如:VIP, GSD, listener, ONS:
  srvctl start|stop|status nodeapps -n<node_name>
  
  5、如果你使用ASM,srvctl也可以start/stop ASM实例:
  srvctl start|stop asm -n <node_name>[-i <asm_inst_name>] [-o<oracle_home>]
  
  6、可以获取所有的环境信息:
  srvctl getenv database -d <db_name> [-i<instance_name>]
  
  7、设置全局环境和变量:
  srvctl setenv database -d<db_name> -t LANG=en
  
  8、从OCR中删除已有的数据库:
  srvctl remove database -d <db_name>
  
  9、向OCR中添加一个数据库的实例:
  srvctl add instance -d <db_name> -i<instance_name> -n <node1>
  srvctl add instance -d <db_name> -i<instance_name> -n <node2>
  
  
  其他的相关操作参考:
  Oracle 10gRAC OCR 和 VotingDisk 的备份与恢复
  http://blog.csdn.net/tianlesoftware/article/details/5467273
  
  Oracle RACASM disk header 备份 恢复 与 重建 示例说明
  http://blog.csdn.net/tianlesoftware/article/details/6743677
  
  Oracle 使用BBED 查看 ASM Disk Header 内容
  http://blog.csdn.net/tianlesoftware/article/details/6739369
  
  
  
  
  ---------------------------------------------------------------------------------------
  版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
  Skype: tianlesoftware
  QQ:  tianlesoftware@gmail.com
  Email: tianlesoftware@gmail.com
  Blog:  http://blog.csdn.net/tianlesoftware
  Weibo: http://weibo.com/tianlesoftware
  Twitter: http://twitter.com/tianlesoftware
  Facebook: http://www.facebook.com/tianlesoftware
  Linkedin: http://cn.linkedin.com/in/tianlesoftware

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-247513-1-1.html 上篇帖子: Oracle 网络架构(Networking Architecture) 说明 下篇帖子: Oracle 优化 SQL,提高效率
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表