当前位置:Gxlcms > mysql > RAC和ASM环境下修改控制文件controlfile

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

时间:2021-07-01 10:21:17 帮助过:27人阅读

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

linux

人气教程排行