[ORACLE] RMAN Recovery (Datafile 삭제되었을 경우)

반응형

1. Fullbackup 본으로 Recovery 수행

1) backup list 확인

RMAN> list backupset;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9       Full    346.03M    DISK        00:00:36     13-JUN-22      
        BP Key: 9   Status: AVAILABLE  Compressed: YES  Tag: TAG20220613T111152
        Piece Name: /home/oracle/rman_backup/dbf_090vuovo_1_1_20220613
  List of Datafiles in backup set 9
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1851194    13-JUN-22 /home/oracle/oradata/oracle12/system01.dbf
  2       Full 1851194    13-JUN-22 /home/oracle/oradata/oracle12/TBS_IMSI01.dbf
  3       Full 1851194    13-JUN-22 /home/oracle/oradata/oracle12/sysaux01.dbf
  4       Full 1851194    13-JUN-22 /home/oracle/oradata/oracle12/undotbs01.dbf
  5       Full 1851194    13-JUN-22 /home/oracle/oradata/oracle12/example01.dbf
  6       Full 1851194    13-JUN-22 /home/oracle/oradata/oracle12/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10      Full    1.03M      DISK        00:00:01     13-JUN-22      
        BP Key: 10   Status: AVAILABLE  Compressed: YES  Tag: TAG20220613T111152
        Piece Name: /home/oracle/rman_backup/dbf_0a0vup15_1_1_20220613
  SPFILE Included: Modification time: 13-JUN-22
  SPFILE db_unique_name: ORACLE12
  Control File Included: Ckp SCN: 1851208      Ckp time: 13-JUN-22

2) TBS_IMSI01.dbf 파일이 삭제된 상황 

3) shutdown abort 후 복구 진행 

4) RMAN 복구

rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Mon Jun 13 11:42:52 2022

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORACLE12 (DBID=2206901446, not open)

RMAN> restore database;

Starting restore at 13-JUN-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=355 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 /home/oracle/oradata/oracle12/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /home/oracle/oradata/oracle12/TBS_IMSI01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /home/oracle/oradata/oracle12/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/oracle/oradata/oracle12/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /home/oracle/oradata/oracle12/example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /home/oracle/oradata/oracle12/users01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/rman_backup/dbf_090vuovo_1_1_20220613
channel ORA_DISK_1: piece handle=/home/oracle/rman_backup/dbf_090vuovo_1_1_20220613 tag=TAG20220613T111152
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 13-JUN-22

RMAN> recover database;

Starting recover at 13-JUN-22
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 5 is already on disk as file /home/oracle/arch_dest/1_5_1106948742.dbf
archived log for thread 1 with sequence 6 is already on disk as file /home/oracle/arch_dest/1_6_1106948742.dbf
archived log for thread 1 with sequence 7 is already on disk as file /home/oracle/arch_dest/1_7_1106948742.dbf
archived log for thread 1 with sequence 8 is already on disk as file /home/oracle/arch_dest/1_8_1106948742.dbf
archived log for thread 1 with sequence 9 is already on disk as file /home/oracle/arch_dest/1_9_1106948742.dbf
archived log for thread 1 with sequence 10 is already on disk as file /home/oracle/arch_dest/1_10_1106948742.dbf
archived log for thread 1 with sequence 11 is already on disk as file /home/oracle/arch_dest/1_11_1106948742.dbf
archived log for thread 1 with sequence 12 is already on disk as file /home/oracle/arch_dest/1_12_1106948742.dbf
archived log file name=/home/oracle/arch_dest/1_5_1106948742.dbf thread=1 sequence=5
archived log file name=/home/oracle/arch_dest/1_6_1106948742.dbf thread=1 sequence=6
archived log file name=/home/oracle/arch_dest/1_7_1106948742.dbf thread=1 sequence=7
archived log file name=/home/oracle/arch_dest/1_8_1106948742.dbf thread=1 sequence=8
archived log file name=/home/oracle/arch_dest/1_9_1106948742.dbf thread=1 sequence=9
archived log file name=/home/oracle/arch_dest/1_10_1106948742.dbf thread=1 sequence=10
media recovery complete, elapsed time: 00:00:01
Finished recover at 13-JUN-22

RMAN> alter database open;
반응형

'Database > Oracle' 카테고리의 다른 글

[ORACLE] RAC SCAN  (0) 2022.06.13
[ORACLE] RMAN Recovery (Control file, Spfile, datafile 모두 유실)  (0) 2022.06.13
[ORACLE] RMAN Script example  (0) 2022.06.13
[ORACLE] RMAN 명령어  (0) 2022.06.13
[ORACLE] Full Online backup & Recovery  (0) 2022.06.09