본문 바로가기
Oracle/RMAN

[RMAN] Datafile 삭제 후 Mount 상태에서복구(offline 안되는 Tablespace)

by 취미툰 2019. 12. 17.
반응형

System 테이블스페이스는 offline이 안되므로 mount 상태에서 복구합니다.

 

(1) 테이터 파일 삭제 및 확인

SQL> !rm -rf /oradata/ORCL19C/system01.dbf

 

SQL> !ls /oradata/ORCL19C/system01.dbf

ls: cannot access /oradata/ORCL19C/system01.dbf: 그런 파일이나 디렉터리가 없습니다

 

SQL> shutdown abort

ORACLE instance shut down.

 

(2) 작업형 명령어로 테이블스페이스 복구

RMAN> run {

startup mount;

restore tablespace system;

recover tablespace system;

alter database open;

}

 

Oracle instance started

database mounted

 

Total System Global Area     788525944 bytes

 

Fixed Size                     8901496 bytes

Variable Size                293601280 bytes

Database Buffers             478150656 bytes

Redo Buffers                   7872512 bytes

 

Starting restore at 19/12/05

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=254 device type=DISK

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /oradata/ORCL19C/system01.dbf

channel ORA_DISK_1: reading from backup piece /home/oracle/rman/comp_20191205_13uiloj4_1_1

channel ORA_DISK_1: piece handle=/home/oracle/rman/comp_20191205_13uiloj4_1_1 tag=TAG20191205T131724

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:55

Finished restore at 19/12/05

 

Starting recover at 19/12/05

using channel ORA_DISK_1

 

starting media recovery

media recovery complete, elapsed time: 00:00:00

 

Finished recover at 19/12/05

 

Statement processed

 

(3) 테이블스페이스 상태 확인

 

$ ls /oradata/ORCL19C/system01.dbf

/oradata/ORCL19C/system01.dbf

 

$ ps -ef |grep pmon

oracle    2480     1  0 14:47 ?        00:00:00 ora_pmon_orcl19c

oracle    2973  5388  0 14:50 pts/1    00:00:00 grep --color=auto pmon

반응형

댓글