一、步骤:
1、一次全备
2、记录时间,增加表空间,查询新增加的数据文件
3、再次全备
4、执行时间点恢复,恢复到2记录的时间之前
5、查询数据文件,发现2增加的数据文件不存在,时间点恢复成功。
二、操作日志:
oracle@oracle[/home/oracle]> export ORACLE_SID=orcl
oracle@oracle[/home/oracle]> rman target / catalog rman/rman@catalog
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jun 15 15:36:47 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1210313093)
connected to recovery catalog database
RMAN> run{
2> ALLOCATE CHANNEL ch00 TYPE disk;
3> BACKUP INCREMENTAL LEVEL=0 SKIP INACCESSIBLE FILESPERSET 5 FORMAT '/rman/bk_%s_%p_%t' DATABASE;
4> sql 'alter system archive log current';
5> BACKUP FORMAT '/rman/archvelog_%s_%p_%t' FILESPERSET 10 ARCHIVELOG ALL DELETE INPUT;
6> BACKUP FORMAT '/rman/cntrl_%s_%p_%t' CURRENT CONTROLFILE;
backup FORMAT '/rman/spfile_%s_%p_%t' spfile;
7> 8> RELEASE CHANNEL ch00;
9> }
allocated channel: ch00
channel ch00: sid=158 devtype=DISK
Starting backup at 15-JUN-09
channel ch00: starting incremental level 0 datafile backupset
channel ch00: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/oradata/orcl/system01.dbf
input datafile fno=00004 name=/oracle/oradata/orcl/users01.dbf
input datafile fno=00003 name=/oracle/oradata/orcl/sysaux01.dbf
input datafile fno=00005 name=/oracle/oradata/orcl/example01.dbf
input datafile fno=00002 name=/oracle/oradata/orcl/undotbs01.dbf
channel ch00: starting piece 1 at 15-JUN-09
channel ch00: finished piece 1 at 15-JUN-09
piece handle=/rman/bk_9_1_689614839 tag=TAG20090615T154036 comment=NONE
channel ch00: backup set complete, elapsed time: 00:03:06
channel ch00: starting incremental level 0 datafile backupset
channel ch00: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ch00: starting piece 1 at 15-JUN-09
channel ch00: finished piece 1 at 15-JUN-09
piece handle=/rman/bk_10_1_689615027 tag=TAG20090615T154036 comment=NONE
channel ch00: backup set complete, elapsed time: 00:00:05
Finished backup at 15-JUN-09
sql statement: alter system archive log current
Starting backup at 15-JUN-09
current log archived
channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=1 sequence=3 recid=1 stamp=682556439
input archive log thread=1 sequence=4 recid=2 stamp=682561319
input archive log thread=1 sequence=5 recid=3 stamp=682561346
input archive log thread=1 sequence=6 recid=4 stamp=682561375
input archive log thread=1 sequence=7 recid=5 stamp=682561574
input archive log thread=1 sequence=8 recid=6 stamp=682561674
input archive log thread=1 sequence=9 recid=7 stamp=682561779
input archive log thread=1 sequence=10 recid=8 stamp=682561881
channel ch00: starting piece 1 at 15-JUN-09
channel ch00: finished piece 1 at 15-JUN-09
piece handle=/rman/archvelog_11_1_689615084 tag=TAG20090615T154439 comment=NONE
channel ch00: backup set complete, elapsed time: 00:01:36
channel ch00: deleting archive log(s)
archive log filename=/oracle/flash_recovery_area/ORCL/archivelog/2009_03_26/o1_mf_1_3_4wq64g05_.arc recid=1 stamp=682556439
archive log filename=/oracle/flash_recovery_area/ORCL/archivelog/2009_03_27/o1_mf_1_4_4wqbwcjj_.arc recid=2 stamp=682561319
archive log filename=/oracle/flash_recovery_area/ORCL/archivelog/2009_03_27/o1_mf_1_5_4wqbxsxx_.arc recid=3 stamp=682561346
archive log filename=/oracle/flash_recovery_area/ORCL/archivelog/2009_03_27/o1_mf_1_6_4wqbymmx_.arc recid=4 stamp=682561375
archive log filename=/oracle/flash_recovery_area/ORCL/archivelog/2009_03_27/o1_mf_1_7_4wqc50dg_.arc recid=5 stamp=682561574
archive log filename=/oracle/flash_recovery_area/ORCL/archivelog/2009_03_27/o1_mf_1_8_4wqc84l6_.arc recid=6 stamp=682561674
archive log filename=/oracle/flash_recovery_area/ORCL/archivelog/2009_03_27/o1_mf_1_9_4wqccchy_.arc recid=7 stamp=682561779
archive log filename=/oracle/flash_recovery_area/ORCL/archivelog/2009_03_27/o1_mf_1_10_4wqcglvb_.arc recid=8 stamp=682561881
channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=1 sequence=11 recid=9 stamp=682561986
input archive log thread=1 sequence=12 recid=10 stamp=682562104
input archive log thread=1 sequence=13 recid=11 stamp=682562214
input archive log thread=1 sequence=14 recid=12 stamp=682562323
input archi