|
|
谢谢大家
最初由 lues 发布
[B]
偶用until time之前有一个数据库全备,我现在试试 [/B]
以下是我的备份集
[root@test7 rman]# ll -rth
总用量 8.4G
-rw-r----- 1 oracle oinstall 623M 12月 22 13:48 SZDB_1_545579276
-rw-r----- 1 oracle oinstall 1.5G 12月 22 13:54 SZDB_1_545579496.bak
-rw-r----- 1 oracle oinstall 1.5G 12月 22 13:57 SZDB_1_545579683.bak
-rw-r----- 1 oracle oinstall 623M 12月 22 13:59 SZDB_1_545579886.bak
-rw-r----- 1 oracle oinstall 623M 12月 22 14:01 SZDB_1_545580042.bak
-rw-r----- 1 oracle oinstall 1.5G 12月 22 14:06 SZDB_1_545580240.bak
-rw-r----- 1 oracle oinstall 1.3M 12月 22 14:07 0ug89pd3_1_1_30.bak
-rw-r----- 1 oracle oinstall 623M 12月 22 14:17 SZDB_1_545580979.bak
-rw-r----- 1 oracle oinstall 1.5G 12月 22 14:19 SZDB_1_545581077.bak
-rw-r----- 1 oracle oinstall 775K 12月 22 14:20 14g89q52_1_1_36.bak
SZDB_1_545581077.bak是我最后一次备份,不过在我前面操作了以后,最后一次备份集无法使用
RMAN> shutdown immediate;
database closed
database dismounted
Oracle instance shut down
RMAN> startup mount;
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
RMAN> run{
2> allocate channel c1 type disk;
3> set until time "to_date('2004-12-22 14:17:00','yyyy-mm-dd hh24:mi:ss')";
4> restore database;
5> recover database;
6> sql 'ALTER DATABASE OPEN RESETLOGS';
7> release channel c1;
8> }
allocated channel: c1
channel c1: sid=8 devtype=DISK
executing command: SET until clause
Starting restore at 23-DEC-04
channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/oradata/szdb/system01.dbf
restoring datafile 00002 to /oracle/oradata/szdb/undotbs01.dbf
restoring datafile 00003 to /oracle/oradata/szdb/cwmlite01.dbf
restoring datafile 00004 to /oracle/oradata/szdb/drsys01.dbf
restoring datafile 00005 to /oracle/oradata/szdb/example01.dbf
restoring datafile 00006 to /oracle/oradata/szdb/indx01.dbf
restoring datafile 00007 to /oracle/oradata/szdb/odm01.dbf
restoring datafile 00008 to /oracle/oradata/szdb/tools01.dbf
restoring datafile 00009 to /oracle/oradata/szdb/users01.dbf
restoring datafile 00010 to /oracle/oradata/szdb/xdb01.dbf
channel c1: restored backup piece 1
piece handle=/opt/rman/SZDB_1_545580240.bak tag=TAG20041222T140359 params=NULL
channel c1: restore complete
channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00011 to /oracle/oradata/szdb/GAME.dbf
channel c1: restored backup piece 1
piece handle=/opt/rman/SZDB_1_545580979.bak tag=TAG20041222T141619 params=NULL
channel c1: restore complete
Finished restore at 23-DEC-04
Starting recover at 23-DEC-04
starting media recovery
archive log thread 1 sequence 33 is already on disk as file /oracle/oradata/szdb/archive/1_33.dbf
channel c1: starting archive log restore to default destination
channel c1: restoring archive log
archive log thread=1 sequence=32
channel c1: restored backup piece 1
piece handle=/opt/rman/0ug89pd3_1_1_30.bak tag=TAG20041222T140730 params=NULL
channel c1: restore complete
archive log filename=/oracle/oradata/szdb/archive/1_32.dbf thread=1 sequence=32
archive log filename=/oracle/oradata/szdb/archive/1_33.dbf thread=1 sequence=33
media recovery complete
Finished recover at 23-DEC-04
sql statement: ALTER DATABASE OPEN RESETLOGS
released channel: c1
RMAN> shutdown immediate;
database closed
database dismounted
Oracle instance shut down
RMAN> startup mount
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
RMAN> run{
2> allocate channel c1 type disk;
3> restore database;
4> recover database;
5> sql 'ALTER DATABASE OPEN RESETLOGS';
6> release channel c1;
7> }
allocated channel: c1
channel c1: sid=8 devtype=DISK
Starting restore at 23-DEC-04
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/23/2004 17:17:22
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
RMAN-06023: no backup or copy of datafile 9 found to restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
RMAN> |
|