Oracle RAC的关闭及启动,需要严格按照步骤来执行,以下就以一套实际的系统为例,来介绍RAC的关闭及启动过程:
环境说明
主机名 | 实例名 | 监听端口 | 字符集 |
db-node1 | orcl1 | 1521 | ZHS16GBK |
db-node2 | orcl2 | 1521 | ZHS16GBK |
关闭
顺序:关闭数据库(实例)-> 关闭ASM实例 -> 关闭节点服务
查看状态: $ srvctl status database -d orcl
Instance orcl1 is running on node db-node1 Instance orcl2 is running on node db-node2
$crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora....SM.lsnr ora....er.type ONLINE ONLINE db-node1 ora.CRS.dg ora....up.type ONLINE ONLINE db-node1 ora.DATA.dg ora....up.type ONLINE ONLINE db-node1 ora....ER.lsnr ora....er.type ONLINE ONLINE db-node1 ora....AF.lsnr ora....er.type ONLINE ONLINE db-node1 ora....N1.lsnr ora....er.type ONLINE ONLINE db-node2 ora.MGMTLSNR ora....nr.type ONLINE ONLINE db-node2 ora.asm ora.asm.type ONLINE ONLINE db-node1 ora.chad ora.chad.type ONLINE ONLINE db-node1 ora.cvu ora.cvu.type ONLINE ONLINE db-node2 ora....E1.lsnr application ONLINE ONLINE db-node1 ora....de1.ons application ONLINE ONLINE db-node1 ora....de1.vip ora....t1.type ONLINE ONLINE db-node1 ora....E2.lsnr application ONLINE ONLINE db-node2 ora....de2.ons application ONLINE ONLINE db-node2 ora....de2.vip ora....t1.type ONLINE ONLINE db-node2 ora.mgmtdb ora....db.type ONLINE ONLINE db-node2 ora....network ora....rk.type ONLINE ONLINE db-node1 ora.ons ora.ons.type ONLINE ONLINE db-node1 ora.orcl.db ora....se.type ONLINE ONLINE db-node1 ora.qosmserver ora....er.type ONLINE ONLINE db-node2 ora.scan1.vip ora....ip.type ONLINE ONLINE db-node2
关闭数据库:$ srvctl stop database -d orcl
关闭ASM: $ srvctl stop asm -n db-node1
$ srvctl stop asm -n db-node2
关闭各节点服务(listener,gsd,ons,vip)
$ srvctl stop nodeapps -n db-node1
$ srvctl stop nodeapps -n db-node2
启动
启动节点服务 -> 启动ASM实例 -> 启动数据库实例
启动各节点服务
$ srvctl start nodeapps -n db-node1
$ srvctl start nodeapps -n db-node2
启动AMS实例:
$ srvctl start asm -n db-node1
$ srvctl start asm -n db-node2
$ srvctl status asm -n db-node1
$ srvctl status asm -n db-node2