RAC中的srvctl和crs命令 oracle rac crs

srvctl 命令
$ srvctl -h
Usage: srvctl [-V]
Usage: srvctl add database -d -o [-m ] [-p ] [-A/netmask] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY}] [-s ][-n ] [-y {AUTOMATIC | MANUAL}]
Usage: srvctl add instance -d -i -n
Usage: srvctl add service -d -s -r "" [-a ""] [-P]
Usage: srvctl add service -d -s -u {-r "" | -a ""}
Usage: srvctl add nodeapps -n -o -A /netmask[/if1[|if2|...]]
Usage: srvctl add asm -n -i -o [-p ]
Usage: srvctl config database
Usage: srvctl config database -d [-a] [-t]
Usage: srvctl config service -d [-s ] [-a] [-S ]
Usage: srvctl config nodeapps -n [-a] [-g] [-s] [-l]
Usage: srvctl config asm -n
Usage: srvctl config listener -n
Usage: srvctl disable database -d
Usage: srvctl disable instance -d -i ""
Usage: srvctl disable service -d -s "" [-i ]
Usage: srvctl disable asm -n [-i ]
Usage: srvctl enable database -d
Usage: srvctl enable instance -d -i ""
Usage: srvctl enable service -d -s "" [-i ]
Usage: srvctl enable asm -n [-i ]
Usage: srvctl getenv database -d [-t ""]
Usage: srvctl getenv instance -d -i [-t ""]
Usage: srvctl getenv service -d -s [-t ""]
Usage: srvctl getenv nodeapps -n [-t ""]
Usage: srvctl modify database -d [-n ] [-m ] [-p] [-r {PRIMARY | PHYSICAL_STANDBY |LOGICAL_STANDBY}] [-s ] [-y {AUTOMATIC | MANUAL}]
Usage: srvctl modify instance -d -i -n
Usage: srvctl modify instance -d -i {-s | -r}
Usage: srvctl modify service -d -s -i -t [-f]
Usage: srvctl modify service -d -s -i -r [-f]
Usage: srvctl modify service -d -s -n -i [-a ] [-f]
Usage: srvctl modify asm -n -i [-o ] [-p ]
Usage: srvctl modify nodeapps -n [-o ] [-A ]
Usage: srvctl relocate service -d -s -i -t [-f]
Usage: srvctl remove database -d [-f]
Usage: srvctl remove instance -d -i [-f]
Usage: srvctl remove service -d -s [-i ] [-f]
Usage: srvctl remove nodeapps -n "" [-f]
Usage: srvctl remove asm -n [-i ] [-f]
Usage: srvctl setenv database -d {-t =[,=,...] | -T =}
Usage: srvctl setenv instance -d [-i ] {-t "=[,=,...]" | -T"="}
Usage: srvctl setenv service -d [-s ] {-t "=[,=,...]" | -T"="}
Usage: srvctl setenv nodeapps -n {-t "=[,=,...]" | -T "="}
Usage: srvctl start database -d [-o ]
Usage: srvctl start instance -d -i "" [-o ]
Usage: srvctl start service -d [-s "" [-i ]] [-o ]
Usage: srvctl start nodeapps -n
Usage: srvctl start asm -n [-i ] [-o ]
Usage: srvctl start listener -n [-l ]
Usage: srvctl status database -d [-f] [-v] [-S ]
Usage: srvctl status instance -d -i "" [-f] [-v] [-S ]
Usage: srvctl status service -d [-s ""] [-f] [-v] [-S ]
Usage: srvctl status nodeapps -n
Usage: srvctl status asm -n
Usage: srvctl stop database -d [-o ]
Usage: srvctl stop instance -d -i "" [-o ]
Usage: srvctl stop service -d [-s "" [-i ]] [-f]
Usage: srvctl stop nodeapps -n [-r]
Usage: srvctl stop asm -n [-i ] [-o ]
Usage: srvctl stop listener -n [-l ]
Usage: srvctl unsetenv database -d -t ""
Usage: srvctl unsetenv instance -d [-i ] -t ""
Usage: srvctl unsetenv service -d [-s ] -t ""
Usage: srvctl unsetenv nodeapps -n -t ""
$从上我们可以看到 srvctl 这个命令工具很强大,可以操作 database, instance ,asm,service , listener,nodeapps (gsd,vip ,ons)这些资源1.通过srvctl命令来start/stop/check所有的实例
$srvctl start|stop|status database -d rac1
[oracle@rac1 ~]$ srvctl status database -d testrac
Instance testrac1 is running on node rac1
Instance testrac2 is running on node rac22.start/stop 指定的实例
$srvctl start |stop |status instance -d -i[oracle@rac1 ~]$ srvctl status instance -dtestrac -i testrac1
Instance testrac1 is running on node rac13.列出当前rac下所有的
$ srvctl config database -d
[oracle@rac1 ~]$ srvctl config database -d testrac
rac1 testrac1 /u01/product/database
rac2 testrac2 /u01/product/database4.start/stop/check 所有的nodeapps,比如:VIP, GSD, listener,ONS:
$ srvctl start|stop|status nodeapps -n
[oracle@rac1 ~]$ srvctl status nodeapps -n rac1
VIP is running on node: rac1
GSD is running on node: rac1
Listener is running on node: rac1
ONS daemon is running on node: rac15.srvctl也可以start/stop ASM实例:
$ srvctl start|stop asm -n [-i ] [-o]
[oracle@rac1 ~]$ srvctl start asm -n rac16.获取所有的环境信息
$ srvctl getenv database -d [-i ]7.设置全局环境变量:
$ srvctl setenv database -d -t LANG=en8.从OCR中删除已有的数据库
$ srvctl remove database -d9.向OCR中添加一个数据库:
$ srvctl add database -d -o [-m ] [-p] [-A /netmask] [-r {PRIMARY |PHYSICAL_STANDBY |LOGICAL_STANDBY}] [-s ]10.向OCR中添加一个数据库的实例:
RAC中的srvctl和crs命令 oracle rac crs
$ srvctl add instance -d -i -n11.向OCR中添加一个ASM实例:
$ srvctl add asm -n -i -o

12.添加一个service
$ srvctl add service -d -s -r [-a ] [-P ] [-u]例如:srvctl add service -d msdb -s msrac -r msdb1 -a msdb2-P preconnect新建了一个服务名叫“msrac”,首先调用msdb1服务器,若有问题则自动调用msdb2服务器。调用RAC中的该服务,只需要注意URL中的service_name为上面配置的“msrac”即可。jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL =TCP)(HOST = racdb3-vip)(PORT = 1521))(ADDRESS = (PROTOCOL =TCP)(HOST = racdb4-vip)(PORT = 1521))(CONNECT_DATA =(SERVER =DEDICATED)(SERVICE_NAME = msrac)(FAILOVER_MODE=(TYPE = SELECT)(METHOD = PRECONNECT)(RETRIES = 180)(DELAY =5))))

13.修改在其他节点上的service(修改的是配置,此时使用的实例不变)
$ srvctl modify service -d -s -i -t

14.relocate某个节点的service到其他节点(当taf转到avail实例上后,又想转到pre的实例上,用relocate)
srvctl relocate service -d -s - i -tcrs 命令
1.查看状态的命令
Usage: crs_stat [resource_name [...]] [-v] [-l][-q] [-c cluster_member]
crs_stat [resource_name [...]] -t [-v] [-q] [-ccluster_member]
crs_stat -p [resource_name [...]] [-q]
crs_stat [-a] application -g
crs_stat [-a] application -r [-c cluster_member]
crs_stat -f [resource_name [...]] [-q] [-c cluster_member]
crs_stat -ls [resource_name [...]] [-q]$crs_stat -t 查看crs及所有的service的状态
[oracle@rac1 ~]$ crs_stat -t
NameTypeTargetStateHost
------------------------------------------------------------
ora....SM1.asmapplicationONLINEONLINErac1
ora....C1.lsnrapplicationONLINEONLINErac1
ora.rac1.gsdapplicationONLINEONLINErac1
ora.rac1.onsapplicationONLINEONLINErac1
ora.rac1.vipapplicationONLINEONLINErac1
ora....SM2.asmapplicationONLINEONLINErac2
ora....C2.lsnrapplicationONLINEONLINErac2
ora.rac2.gsdapplicationONLINEONLINErac2
ora.rac2.onsapplicationONLINEONLINErac2
ora.rac2.vipapplicationONLINEONLINErac2
ora.testrac.dbapplicationONLINEONLINErac1
ora....c1.instapplicationONLINEONLINErac1
ora....c2.instapplicationONLINEONLINErac22.crsctl check crs 检查CRS相关服务状态
[oracle@rac1 ~]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy3.启动和关闭命令
$ crs_start –all --启动所有的crs服务
$ crs_stop –all --停止所有的crs服务
$ crsctl start crs --启动crs服务
$ crsctl stop crs --停止crs服务
$ srvctl start nodeapps -n rac1(rac2) --启动某节点上所有的应用
$ srvctl stop nodeapps -n rac1(rac2) --停止某节点上所有的应用
$ srvctl start listener -n rac1(rac2) --启动某个节点的listener
$ srvctl stop listener -n rac1(rac2) --停止某个节点的listener
$ srvctl start instance –d db –i rac1(rac2) --启动某个instance
$ srvctl stop instance –d db –i rac1(rac2) --停止某个instance
$ srvctl start database –d db --启动数据库
$ srvctl stop database –d db --停止数据库http://space.itpub.net/9399028/viewspace-697128

  

爱华网本文地址 » http://www.aihuau.com/a/25101015/241414.html

更多阅读

宫颈锥切术在CIN中的诊断和治疗价值 cin3锥切干净就好了吗

摘 要 目的 评价宫颈锥切术在CIN中的诊断和治疗价值。方法 回顾分析22例宫颈锥切术患者的细胞学、阴道镜检查及活检结果、颈管诊刮、宫颈锥切病理及子宫切除术的病理结果,同时分析了并发症的防治及随诊TCT的结果。结果 宫颈锥

运动中的“极点” 和“第二次呼吸” 运动极点

运动中的“极点” 和“第二次呼吸”在中长跑和参加时间稍长的激烈运动时,不少人都会出现呼吸困难,心跳急促,动作迟缓,不愿再运动下去的那种非常难受的阶段。坚持下去,鼓起勇气,有意识地调整步伐和呼吸的节奏,你会重新感到呼吸轻松,心跳自然,

转载 新昌大佛寺辉煌历史中的人物和事迹 新昌大佛寺 旅馆

原文地址:新昌大佛寺辉煌历史中的人物和事迹作者:石城古刹新昌大佛寺辉煌历史中的人物和事迹按:此为广场建大佛寺历史照壁石刻而汇集的史料,并提炼亮点,供艺术设计者参考一、昙光开山 创隐岳寺(东晋)二、支兰立寺 般若炽盛(东晋)三、三僧

声明:《RAC中的srvctl和crs命令 oracle rac crs》为网友木槿暖夏分享!如侵犯到您的合法权益请联系我们删除