首頁 >資料庫 >mysql教程 >RAC和ASM环境下修改控制文件control file

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

WBOY
WBOY原創
2016-06-07 17:10:471219瀏覽

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

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn