当前位置:Gxlcms >
数据库问题 >
Oracle RMAN 备份及不完全恢复(删除archievelog)
Oracle RMAN 备份及不完全恢复(删除archievelog)
时间:2021-07-01 10:21:17
帮助过:3人阅读
2> ;
List of Archived Log Copies for database with db_unique_name ORCL
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - ---------
7 1 12 A 18-JUN-16
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2016_06_18/o1_mf_1_12_cpb2xhg8_.arc
8 1 13 A 18-JUN-16
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2016_06_18/o1_mf_1_13_cpb35zgs_.arc
9 1 14 A 18-JUN-16
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2016_06_18/o1_mf_1_14_cpb36dbo_.arc
只能不完全恢复到12
shutdown abort;
starup force mount;
RMAN> run { 2> set until sequence 12; 3> restore database; 4> }
executing command: SET until clause
Starting restore at 18-JUN-16 using channel ORA_DISK_1 flashing back control file to SCN 1080714
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 /u01/app/oracle/oradata/orcl/system01.dbf channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs01.dbf channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/orcl/test01.dbf channel ORA_DISK_1: reading from backup piece /home/oracle/backup/back_full_05r8fcon_1_1_20160618 channel ORA_DISK_1: piece handle=/home/oracle/backup/back_full_05r8fcon_1_1_20160618 tag=BACK_FULL channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:35 Finished restore at 18-JUN-16
RMAN> run { 2> set until sequence 12; 3> recover database; 4> }
executing command: SET until clause
Starting recover at 18-JUN-16 using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archived log restore to default destination channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=10 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=11 channel ORA_DISK_1: reading from backup piece /home/oracle/backup/arch_07r8fcti_1_1_20160618 channel ORA_DISK_1: piece handle=/home/oracle/backup/arch_07r8fcti_1_1_20160618 tag=ARC_BACK channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2016_06_18/o1_mf_1_10_cpb4clcf_.arc thread=1 sequence=10 channel default: deleting archived log(s) archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2016_06_18/o1_mf_1_10_cpb4clcf_.arc RECID=20 STAMP=914865395 archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2016_06_18/o1_mf_1_11_cpb4clcl_.arc thread=1 sequence=11 channel default: deleting archived log(s) archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2016_06_18/o1_mf_1_11_cpb4clcl_.arc RECID=19 STAMP=914865394 media recovery complete, elapsed time: 00:00:00 Finished recover at 18-JUN-16
RMAN> alter database open resetlogs;
database opened
|
用scott/tiger登录后查看,发现插入的数据不在了.
Oracle RMAN 备份及不完全恢复(删除archievelog)
标签: