RMAN> backup incremental level=0 database plus archivelog delete all input;
Starting backup at 2009-11-27 09:31:31
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=1 recid=67 stamp=704021491
channel ORA_DISK_1: starting piece 1 at 2009-11-27 09:31:33
channel ORA_DISK_1: finished piece 1 at 2009-11-27 09:31:34
piece
handle=/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_annnn_TAG200
91127T093131_5jybzo2h_.bkp tag=TAG20091127T093131 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log
filename=/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_1_5jybz
mdc_.arc recid=67 stamp=704021491
Finished backup at 2009-11-27 09:31:34
Starting backup at 2009-11-27 09:31:34
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/app/oradata/victor/system01.dbf
input datafile fno=00002 name=/oracle/app/oradata/victor/undotbs01.dbf
input datafile fno=00003 name=/oracle/app/oradata/victor/sysaux01.dbf
input datafile fno=00005 name=/oracle/app/oradata/victor/example01.dbf
input datafile fno=00006 name=/oradata/coe/coe01.dbf
input datafile fno=00007 name=/oradata/coe/coe02.dbf
input datafile fno=00008 name=/oradata/coe/coe03.dbf
input datafile fno=00004 name=/oracle/app/oradata/victor/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2009-11-27 09:31:34
channel ORA_DISK_1: finished piece 1 at 2009-11-27 09:32:09
piece
handle=/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_nnnd0_TAG200
91127T093134_5jybzpl9_.bkp tag=TAG20091127T093134 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
Finished backup at 2009-11-27 09:32:09
Starting backup at 2009-11-27 09:32:09
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=2 recid=68 stamp=704021529
channel ORA_DISK_1: starting piece 1 at 2009-11-27 09:32:10
channel ORA_DISK_1: finished piece 1 at 2009-11-27 09:32:11
piece
handle=/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_annnn_TAG200
91127T093209_5jyc0tv9_.bkp tag=TAG20091127T093209 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log
filename=/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_2_5jyc0
sn0_.arc recid=68 stamp=704021529
Finished backup at 2009-11-27 09:32:11
Starting Control File and SPFILE Autobackup at 2009-11-27 09:32:11
piece
handle=/u01/app/flash_recovery_area/VICTOR/autobackup/2009_11_27/o1_mf_s_704021532
_5jyc0wdq_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2009-11-27 09:32:13
RMAN> exit
Recovery Manager complete.
[oracle@lxp1 ~]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Fri Nov 27 09:37:38 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: VICTOR (DBID=266005057)
RMAN> backup incremental level=1 database plus archivelog delete all input;
Starting backup at 2009-11-27 09:38:03
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=142 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=3 recid=69 stamp=704021884
channel ORA_DISK_1: starting piece 1 at 2009-11-27 09:38:05
channel ORA_DISK_1: finished piece 1 at 2009-11-27 09:38:06
piece
handle=/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_annnn_TAG200
91127T093804_5jyccxss_.bkp tag=TAG20091127T093804 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log
filename=/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_3_5jycc
w0b_.arc recid=69 stamp=704021884
Finished backup at 2009-11-27 09:38:06
Starting backup at 2009-11-27 09:38:06
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/app/oradata/victor/system01.dbf
input datafile fno=00002 name=/oracle/app/oradata/victor/undotbs01.dbf
input datafile fno=00003 name=/oracle/app/oradata/victor/sysaux01.dbf
input datafile fno=00005 name=/oracle/app/oradata/victor/example01.dbf
input datafile fno=00006 name=/oradata/coe/coe01.dbf
input datafile fno=00007 name=/oradata/coe/coe02.dbf
input datafile fno=00008 name=/oradata/coe/coe03.dbf
input datafile fno=00004 name=/oracle/app/oradata/victor/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2009-11-27 09:38:07
channel ORA_DISK_1: finished piece 1 at 2009-11-27 09:38:42
piece
handle=/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_nnnd1_TAG200
91127T093807_5jycczg6_.bkp tag=TAG20091127T093807 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
Finished backup at 2009-11-27 09:38:42
Starting backup at 2009-11-27 09:38:42
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=4 recid=70 stamp=704021922
channel ORA_DISK_1: starting piece 1 at 2009-11-27 09:38:43
channel ORA_DISK_1: finished piece 1 at 2009-11-27 09:38:44
piece
handle=/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_annnn_TAG200
91127T093842_5jycf3on_.bkp tag=TAG20091127T093842 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log
filename=/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_4_5jycf
2gm_.arc recid=70 stamp=704021922
Finished backup at 2009-11-27 09:38:44
Starting Control File and SPFILE Autobackup at 2009-11-27 09:38:44
piece
handle=/u01/app/flash_recovery_area/VICTOR/autobackup/2009_11_27/o1_mf_s_704021924
_5jycf57s_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2009-11-27 09:38:45
RMAN> exit
Recovery Manager complete.
[oracle@lxp1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Nov 27 09:38:57 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
......
.......
........这里加了一些表和表里加入了一些数据
SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss')t1 from dual;
T1
-------------------
2009-11-27 09:40:43
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 -
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@lxp1 ~]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Fri Nov 27 09:42:02 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 272629760 bytes
Fixed Size 1266996 bytes
Variable Size 146803404 bytes
Database Buffers 121634816 bytes
Redo Buffers
RMAN> restore controlfile from
'/u01/app/flash_recovery_area/VICTOR/autobackup/2009_11_27/o1_mf_s_704021924_5jycf
57s_.bkp';
Starting restore at 2009-11-27 09:47:34
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/oracle/app/oradata/victor/control01.ctl
output filename=/oracle/app/oradata/victor/control02.ctl
output filename=/oracle/app/oradata/victor/control03.ctl
Finished restore at 2009-11-27 09:47:37
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 2009-11-27 09:48:15
Starting implicit crosscheck backup at 2009-11-27 09:48:15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 7 objects
Finished implicit crosscheck backup at 2009-11-27 09:48:16
Starting implicit crosscheck copy at 2009-11-27 09:48:16
using channel ORA_DISK_1
Finished implicit crosscheck copy at 2009-11-27 09:48:16
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name:
/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_5_5jyck26d_.arc
File Name:
/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_6_5jyckk1h_.arc
File Name:
/u01/app/flash_recovery_area/VICTOR/autobackup/2009_11_27/o1_mf_s_704021924_5jycf5
7s_.bkp
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/app/oradata/victor/system01.dbf
restoring datafile 00002 to /oracle/app/oradata/victor/undotbs01.dbf
restoring datafile 00003 to /oracle/app/oradata/victor/sysaux01.dbf
restoring datafile 00004 to /oracle/app/oradata/victor/users01.dbf
restoring datafile 00005 to /oracle/app/oradata/victor/example01.dbf
restoring datafile 00006 to /oradata/coe/coe01.dbf
restoring datafile 00007 to /oradata/coe/coe02.dbf
restoring datafile 00008 to /oradata/coe/coe03.dbf
channel ORA_DISK_1: reading from backup piece
/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_nnnd0_TAG20091127T0
93134_5jybzpl9_.bkp
channel ORA_DISK_1: restored backup piece 1
piece
handle=/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_nnnd0_TAG200
91127T093134_5jybzpl9_.bkp tag=TAG20091127T093134
channel ORA_DISK_1: restore complete, elapsed time: 00:00:36
Finished restore at 2009-11-27 09:48:53
RMAN> recover database until time "TO_DATE('2009-11-27 09:40:43','YYYY-MM-DD
HH24:MI:SS')";
2> 3>
Starting recover at 2009-11-27 09:49:13
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /oracle/app/oradata/victor/system01.dbf
destination for restore of datafile 00002:
/oracle/app/oradata/victor/undotbs01.dbf
destination for restore of datafile 00003: /oracle/app/oradata/victor/sysaux01.dbf
destination for restore of datafile 00004: /oracle/app/oradata/victor/users01.dbf
destination for restore of datafile 00005:
/oracle/app/oradata/victor/example01.dbf
destination for restore of datafile 00006: /oradata/coe/coe01.dbf
destination for restore of datafile 00007: /oradata/coe/coe02.dbf
destination for restore of datafile 00008: /oradata/coe/coe03.dbf
channel ORA_DISK_1: reading from backup piece
/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_nnnd1_TAG20091127T0
93807_5jycczg6_.bkp
channel ORA_DISK_1: restored backup piece 1
piece
handle=/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_nnnd1_TAG200
91127T093807_5jycczg6_.bkp tag=TAG20091127T093807
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
starting media recovery
archive log thread 1 sequence 5 is already on disk as file
/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_5_5jyck26d_.arc
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=4
channel ORA_DISK_1: reading from backup piece
/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_annnn_TAG20091127T0
93842_5jycf3on_.bkp
channel ORA_DISK_1: restored backup piece 1
piece
handle=/u01/app/flash_recovery_area/VICTOR/backupset/2009_11_27/o1_mf_annnn_TAG200
91127T093842_5jycf3on_.bkp tag=TAG20091127T093842
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archive log
filename=/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_4_5jyd0
wg0_.arc thread=1 sequence=4
channel default: deleting archive log(s)
archive log
filename=/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_4_5jyd0
wg0_.arc recid=76 stamp=704022556
archive log
filename=/u01/app/flash_recovery_area/VICTOR/archivelog/2009_11_27/o1_mf_1_5_5jyck
26d_.arc thread=1 sequence=5
media recovery complete, elapsed time: 00:00:02
Finished recover at 2009-11-27 09:49:19
RMAN> alter database open resetlogs;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16111659/viewspace-620766/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16111659/viewspace-620766/