大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。
Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
一、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
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/194729.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...