码迷,mamicode.com
首页 > 其他好文 > 详细

RAC和ASM环境下修改控制文件control file

时间:2016-06-12 20:08:10      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:

1,目前控制文件只有一个,为了安全性,增加到3个

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA/racdb/controlfile/current.283.914350675

2,执行如下sql

SQL> alter system set control_files = ‘+DATA/racdb/controlfile/control01.ctl‘,‘+DATA/racdb/controlfile/control02.ctl‘,‘+DATA/racdb/controlfile/control03.ctl‘ scope=spfile;

3,停止数据库

$ srvctl stop database -d racdb

4,复制控制文件

ASMCMD> pwd
+data/racdb/CONTROLFILE
ASMCMD> ls       
current.283.914350675
ASMCMD> cp current.283.914350675 control01.ctl
copying +data/racdb/CONTROLFILE/current.283.914350675 -> +data/racdb/CONTROLFILE/control01.ctl
ASMCMD> cp current.283.914350675 control02.ctl
copying +data/racdb/CONTROLFILE/current.283.914350675 -> +data/racdb/CONTROLFILE/control02.ctl
ASMCMD> cp current.283.914350675 control03.ctl
copying +data/racdb/CONTROLFILE/current.283.914350675 -> +data/racdb/CONTROLFILE/control03.ctl
ASMCMD> 

5,重新启动数据库

$ srvctl start database -d racdb

6,验证结果


SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA/racdb/controlfile/control01.ctl
+DATA/racdb/controlfile/control02.ctl
+DATA/racdb/controlfile/control03.ctl

 

RAC和ASM环境下修改控制文件control file

标签:

原文地址:http://www.cnblogs.com/abclife/p/5578521.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!