一、srvctl命令的使用
srvctl是service control的缩写,基本的用法是srvctl [],使用srvctl命令,可以对rac各个节点的数据库实例,asm实例和监听器等进行管理,挺方便的工具
oracle@rac2 ~]$ srvctl
Usage: srvctl []
command: enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config
objects: database|instance|service|nodeapps|asm|listener
For detailed help on each command and object and its options use:
srvctl -h
获取更详细的帮助
[oracle@rac2 ~]$ srvctl start asm -h
Usage: srvctl start asm -n [-i ] [-o ] [-c | -q]
-n Node name
-i ASM instance name
-o Options to startup command (e.g. open, mount, or nomount)
-c Connect string (default: / as sysdba)
-q Query connect string from standard input
-h Print usage oracle认证考试http://www.cuug.com/ 二、关闭RAC数据库
[oracle@rac2 ~]$ srvctl stop database -d racdb
[oracle@rac2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
———————————————————————-
ora…SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora…C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora…SM2.asm application 0/5 0/0 ONLINE ONLINE rac2
ora…C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 OFFLINE OFFLINE
ora…b1.inst application 0/5 0/0 OFFLINE OFFLINE
ora…b2.inst application 0/5 0/0 OFFLINE OFFLINE
关闭各节点的ASM实例
[oracle@rac2 ~]$ srvctl stop asm -n rac1
[oracle@rac2 ~]$ srvctl stop asm -n rac2
[oracle@rac2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
———————————————————————-
ora…SM1.asm application 0/5 0/0 OFFLINE OFFLINE
ora…C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora…SM2.asm application 0/5 0/0 OFFLINE OFFLINE
ora…C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 OFFLINE OFFLINE
ora…b1.inst application 0/5 0/0 OFFLINE OFFLINE
ora…b2.inst application 0/5 0/0 OFFLINE OFFLINE
今天的文章oracle srvctl命令,关闭RAC、srvctl命令分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/5586.html