資料庫不完全恢復。

xychong123發表於2016-12-22
RMAN> list backup of database SUMMARY;
List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
2552    B  F  A DISK        08-DEC-16       1       1       NO         Q107
2688    B  F  A DISK        08-DEC-16       11      1       YES        TAG20161208T170624
4415    B  F  A DISK        22-DEC-16       1       1       NO         TAG20161222T093418



RMAN> startup mount


Oracle instance started
database mounted


Total System Global Area    1068937216 bytes


Fixed Size                     2260088 bytes
Variable Size                666895240 bytes
Database Buffers             394264576 bytes
Redo Buffers                   5517312 bytes


RMAN> list backup of database;




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




BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2552    Full    363.09M    DISK        00:00:04     08-DEC-16      
        BP Key: 2565   Status: AVAILABLE  Compressed: NO  Tag: Q107
        Piece Name: /u01/p1_full_19rmvges_1_1.bak
  List of Datafiles in backup set 2552
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 599192     08-DEC-16 /opt/PROD2/system01.dbf
  2       Full 599192     08-DEC-16 /opt/PROD2/sysaux01.dbf
  3       Full 599192     08-DEC-16 /opt/PROD2/undotbs01.dbf
  4       Full 599192     08-DEC-16 /opt/PROD2/users01.dbf


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2688    Full    43.35M     DISK        00:00:06     08-DEC-16      
        Keep: BACKUP_LOGS        Until: FOREVER        
  List of Datafiles in backup set 2688
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 599607     08-DEC-16 /opt/PROD2/system01.dbf


  Backup Set Copy #1 of backup set 2688
  Device Type Elapsed Time Completion Time Compressed Tag
  ----------- ------------ --------------- ---------- ---
  DISK        00:00:06     08-DEC-16       YES        TAG20161208T170624


    List of Backup Pieces for backup set 2688 Copy #1
    BP Key  Pc# Status      Piece Name
    ------- --- ----------- ----------
    2691    1   AVAILABLE   /u01/bak/sys_1crmvgkh_1_1.bak
    2690    2   AVAILABLE   /u01/bak/sys_1crmvgkh_2_1.bak
    2693    3   AVAILABLE   /u01/bak/sys_1crmvgkh_3_1.bak
    2692    4   AVAILABLE   /u01/bak/sys_1crmvgkh_4_1.bak
    2695    5   AVAILABLE   /u01/bak/sys_1crmvgkh_5_1.bak
    2694    6   AVAILABLE   /u01/bak/sys_1crmvgkh_6_1.bak
    2697    7   AVAILABLE   /u01/bak/sys_1crmvgkh_7_1.bak
    2696    8   AVAILABLE   /u01/bak/sys_1crmvgkh_8_1.bak
    2699    9   AVAILABLE   /u01/bak/sys_1crmvgkh_9_1.bak
    2698    10  AVAILABLE   /u01/bak/sys_1crmvgkh_10_1.bak
    2700    11  AVAILABLE   /u01/bak/sys_1crmvgkh_11_1.bak


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4415    Full    471.44M    DISK        00:00:09     22-DEC-16      
        BP Key: 4417   Status: AVAILABLE  Compressed: NO  Tag: TAG20161222T093418
        Piece Name: /opt/p2_1tro3jcq_1_1.bak
  List of Datafiles in backup set 4415
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1113425    22-DEC-16 /opt/PROD2/system01.dbf
  2       Full 1113425    22-DEC-16 /opt/PROD2/sysaux01.dbf
  3       Full 1113425    22-DEC-16 /opt/PROD2/undotbs01.dbf
  4       Full 1113425    22-DEC-16 /opt/PROD2/users01.dbf


RMAN> restore database from tag 'Q107';


Starting restore at 22-DEC-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=191 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 /opt/PROD2/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /opt/PROD2/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /opt/PROD2/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /opt/PROD2/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/p1_full_19rmvges_1_1.bak
channel ORA_DISK_1: piece handle=/u01/p1_full_19rmvges_1_1.bak tag=Q107
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 22-DEC-16


RMAN> run{
set until time "to_date('2016-12-21 17:30:00','yyyy-mm-dd hh24:mi:ss')";
recover database;
}2> 3> 4> 


executing command: SET until clause


Starting recover at 22-DEC-16
using channel ORA_DISK_1


starting media recovery


archived log for thread 1 with sequence 12 is already on disk as file /opt/arc/1_12_929193070.dbf
archived log for thread 1 with sequence 13 is already on disk as file /opt/arc/1_13_929193070.dbf
archived log for thread 1 with sequence 14 is already on disk as file /opt/arc/1_14_929193070.dbf
archived log for thread 1 with sequence 15 is already on disk as file /opt/arc/1_15_929193070.dbf
archived log for thread 1 with sequence 16 is already on disk as file /opt/arc/1_16_929193070.dbf
archived log for thread 1 with sequence 17 is already on disk as file /opt/arc/1_17_929193070.dbf
archived log for thread 1 with sequence 18 is already on disk as file /opt/arc/1_18_929193070.dbf
archived log for thread 1 with sequence 19 is already on disk as file /opt/arc/1_19_929193070.dbf
archived log for thread 1 with sequence 1 is already on disk as file /opt/arc/1_1_930580866.dbf
archived log for thread 1 with sequence 2 is already on disk as file /opt/arc/1_2_930580866.dbf
archived log for thread 1 with sequence 3 is already on disk as file /opt/arc/1_3_930580866.dbf
archived log for thread 1 with sequence 4 is already on disk as file /opt/arc/1_4_930580866.dbf
archived log for thread 1 with sequence 5 is already on disk as file /opt/arc/1_5_930580866.dbf
archived log for thread 1 with sequence 6 is already on disk as file /opt/arc/1_6_930580866.dbf
archived log for thread 1 with sequence 1 is already on disk as file /opt/arc/1_1_931094447.dbf
archived log file name=/opt/arc/1_12_929193070.dbf thread=1 sequence=12
archived log file name=/opt/arc/1_13_929193070.dbf thread=1 sequence=13
archived log file name=/opt/arc/1_14_929193070.dbf thread=1 sequence=14
archived log file name=/opt/arc/1_15_929193070.dbf thread=1 sequence=15
archived log file name=/opt/arc/1_16_929193070.dbf thread=1 sequence=16
archived log file name=/opt/arc/1_17_929193070.dbf thread=1 sequence=17
archived log file name=/opt/arc/1_18_929193070.dbf thread=1 sequence=18
archived log file name=/opt/arc/1_19_929193070.dbf thread=1 sequence=19
archived log file name=/opt/arc/1_1_930580866.dbf thread=1 sequence=1
archived log file name=/opt/arc/1_2_930580866.dbf thread=1 sequence=2
archived log file name=/opt/arc/1_3_930580866.dbf thread=1 sequence=3
archived log file name=/opt/arc/1_4_930580866.dbf thread=1 sequence=4
archived log file name=/opt/arc/1_5_930580866.dbf thread=1 sequence=5
archived log file name=/opt/arc/1_6_930580866.dbf thread=1 sequence=6
archived log file name=/opt/arc/1_1_931094447.dbf thread=1 sequence=1
media recovery complete, elapsed time: 00:00:38
Finished recover at 22-DEC-16


RMAN> 


RMAN> alter database open resetlogs;


database opened
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete


RMAN> 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20747382/viewspace-2131176/,如需轉載,請註明出處,否則將追究法律責任。

相關文章