Oracle基于RMAN的不完全恢复(五)
rved.
connected to target database (not started)
RMAN> startup mount
Oracle instance started
database mounted
Total System Global Area 1653518336 bytes
Fixed Size 2228904 bytes
Variable Size 1140854104 bytes
Database Buffers 503316480 bytes
Redo Buffers 7118848 bytes
RMAN> run{
2> allocate channel c1 device type disk;
3> set until logseq 6 thread 1;
4> restore database;
5> recover database;
6> sql 'alter database open resetlogs';
7> release channel c1;
8> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=18 device type=DISK
executing command: SET until clause
Starting restore at 05-FEB-2013 14:08:40
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00001 to /u01/app/oracle/oradata/ZWC/system01.dbf
channel c1: restoring datafile 00002 to /u01/app/oracle/oradata/ZWC/sysaux01.dbf
channel c1: restoring datafile 00003 to /u01/app/oracle/oradata/ZWC/undotbs01.dbf
channel c1: restoring datafile 00004 to /u01/app/oracle/oradata/ZWC/users01.dbf
channel c1: restoring datafile 00005 to /u01/app/oracle/oradata/ZWC/example01.dbf
channel c1: reading from backup piece /u01/backup/db_full_03o179nl_1_1
channel c1: piece handle=/u01/backup/db_full_03o179nl_1_1 tag=FULLBAK2
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:55
Finished restore at 05-FEB-2013 14:09:36
Starting recover at 05-FEB-2013 14:09:36
starting media recovery
archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/oradata/ZWC/arch/1_5_806583408.dbf
archived log file name=/u01/app/oracle/oradata/ZWC/arch/1_5_806583408.dbf thread=1 sequence=5
media recovery complete, elapsed time: 00:00:00
Finished recover at 05-FEB-2013 14:09:37
sql statement: alter database open resetlogs
released channel: c1
RMAN> exit
Recovery Manager complete.
[oracle@zwc ~]$ sqlplus zhongwc/zhongwc
SQL*Plus: Release 11.2.0.3.0 Production on Tue Feb 5 14:10:02 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from t_rec;
ID NAME
---------- ----------
1 aaa
2 bbb
3 ccc
4 ddd
5 eee
6 fff
6 rows selected.
基于time
[oracle@zwc ~]$ sqlplus zhongwc/zhongwc
SQL*Plus: Release 11.2.0.3.0 Production on Tue Feb 5 14:13:38 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from t_rec;
ID NAME
---------- ----------
1 aaa
2 bbb
3 ccc
4 ddd
5 eee
6 fff
6 rows selected.
SQL> exit