ORACLE RAC停止和启动

ORACLE RAC停止和启动
节点1:10.114.xxx.86(主)
节点2:10.114.xxx.87
1 停机前的准备工作
读取内存中参数,生成spfile或者pfile
节点1

create pfile=’/Oracle/20171031/pfile.txt’ from spfile;
create pfile = ‘/Oracle/20171031/memory.ora’ from memory;

节点2

create pfile=’/Oracle/20171031/pfile.txt’ from spfile;
create pfile = ‘/Oracle/20171031/memory.ora’ from memory;

ORACLE ARC停止
先看一下有多少用户在线 ,多的话就kill掉,这样停机就能快些。
[oracle@wuhlpmtdb02 ~]$ ps -ef|grep LOCAL=NO
1,关闭数据库:
以oracl用户执行srvctl命令:
然后查看状态:
[oracle@wuhlpmtdb03 20171031]$ srvctl status database -d primarydb
Instance primaryd1 is running on node wuhlpmtdb02
Instance primaryd2 is running on node wuhlpmtdb03
[oracle@wuhlpmtdb03 ~]$ srvctl stop database -d primarydb —停止所有节点上的实例
2,停止HAS(High Availability Services),必须以root用户
[root@wuhlpmtdb03 bin]# cd /Oracle/app/11.2.0/grid/bin
[root@wuhlpmtdb03 bin]# ./crsctl stop has -f
对于crsctl stop has 只有一个可选的参数就是-f,该命令只能停执行该命令服务器上的HAS而不能停所有节点上的。所以要把RAC全部停掉,需要在所有节点执行该命令。
3,停止节点集群服务,必须以root用户:
[root@rac1 oracle]# cd /Oracle/app/11.2.0/grid/bin
[root@rac1 bin]# ./crsctl stop cluster —-停止本节点集群服务
[root@rac1 bin]# ./crsctl stop cluster -all —-停止所有节点服务
也可以如下控制所停节点:
[root@rac1 bin]# ./crsctl stop cluster -n primaryd1 primaryd2

ORACLErac 启动
检查cluster状态
[root@wuhlpmtdb03 bin]# ./crsctl stat res -t
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Status failed, or completed with errors.
[root@wuhlpmtdb03 bin]# ./crsctl check cluster -all
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Check failed, or completed with errors.
启动crs服务1节点
[root@rac1 bin]# ./crsctl start crs

[root@rac1 bin]# ./crsctl check cluster -all

[root@rac1 bin]# ./crsctl stat res -t

启动crs服务2节点
[root@rac1 bin]# ./crsctl start crs

[root@rac1 bin]# ./crsctl check cluster -all

[root@rac1 bin]# ./crsctl stat res -t

进去asm确认asm磁盘组状态用grid用户
sqlplus / as sysasm
SQL> select group_number,name,state,voting_files from v$asm_diskgroup;
因为oracle数据库还未启动所以DATA和LOG磁盘为dismonted状态。

启动oracle数据
srvctl start instance -d oracle -n primaryd1
srvctl start instance -d oracle -n primaryd2

确认数据库状态
[oracle@rac1 ~]$ srvctl status database -d primarydb

进去asm确认asm磁盘组状态
select group_number,name,state,voting_files from v$asm_diskgroup;

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值