欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

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

程序员文章站 2022-06-04 13:29:41
...

1,目前控制文件只有一个,为了安全性,计划增加到3个 SQLgt; select name from v$controlfile;NAME--------------------------

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

SQL> select name from v$controlfile;


NAME
--------------------------------------------------------------------------------

+DATA/tyolap/controlfile/current.256.772291325

2,执行如下sql


alter system set control_files = '+DATA/tyolap/controlfile/control01.ctl','+DATA/tyolap/controlfile/control02.ctl','+DATA/tyolap/controlfile/control03.ctl' scope=spfile;


3,停止数据库

[grid@dtydb3 ~]$ srvctl stop database -d tyolap


4,复制控制文件

ASMCMD> pwd
+data/TYOLAP/CONTROLFILE
ASMCMD> ls
Current.256.772291325
test.ctl
ASMCMD> cp Current.256.772291325 control01.ctl
copying +data/TYOLAP/CONTROLFILE/Current.256.772291325 -> +data/TYOLAP/CONTROLFILE/control01.ctl
ASMCMD> cp Current.256.772291325 control02.ctl
copying +data/TYOLAP/CONTROLFILE/Current.256.772291325 -> +data/TYOLAP/CONTROLFILE/control02.ctl
ASMCMD> cp Current.256.772291325 control03.ctl
copying +data/TYOLAP/CONTROLFILE/Current.256.772291325 -> +data/TYOLAP/CONTROLFILE/control03.ctl
ASMCMD>

5,,重新启动数据库

[grid@dtydb3 ~]$ srvctl start database -d tyolap

6,验证结果


SQL> select name from v$controlfile;

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

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