본문 바로가기
DBMS/ORACLE

ASM, spfile 환경 control file 다중화

by 드바 2023. 7. 1.
ASM, spfile 환경에서 control file 다중화 

1. shutdown
2. nomount 후 현재 컨트롤파일 restore(RMAN)
3. spfile 파라미터 수정
4. shutdown 후 startup

 

-- 현재설정 확인
SQL> show parameter control

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      +FRA/db1/controlfile/backup.256.779279155


1. shutdown
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.


2. nomount 후 현재 컨트롤파일 restore(RMAN)
RMAN> startup nomount

-- ASM '+DATA' 디스크 그룹에 restore(최상위만 적어주면 하위 디렉토리는 자동경로)
RMAN> restore controlfile to '+DATA' from '+FRA/db1/controlfile/backup.256.779279155';

-- asmcmd에서 restore된 controlfile 확인
[oracle@server15 ~]$ su - grid
[oracle@server15 ~]$ asmcmd
ASMCMD> cd data/db1
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
TEMPFILE/
ASMCMD> cd controlfile
ASMCMD> ls
backup.268.779437277
ASMCMD> exit


3. 파라미터파일 수정
[oracle@server15 ~]$ sqlplus / as sysdba

-- spfile 수정
SQL> alter system set control_files='+FRA/db1/controlfile/backup.256.779279155','+DATA/db1/controlfile/backup.268.779437277' scope=spfile ;

System altered.


4. shutdown 후 startup
SQL> shut immediate
SQL> startup

-- control_file 확인
SQL> show parameter control

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      +FRA/db1/controlfile/backup.25
                                                 6.779279155, +DATA/db1/control
                                                 file/backup.268.779437277

댓글