使用level=0的基础备份后不能恢复,提示数据文件是从老备份里恢复的,请各位帮忙看看
操作如下:[oracle@test]$ rman target / catalog rman/rman@rmanRecovery Manager: Release 10.2.0.1.0 - Production on ÐÇÆÚËÄ 1ÔÂ 25 16:40:30 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: ORCL (DBID=1140318224)
connected to recovery catalog databaseRMAN> backup incremental level=0 database format '/home/oracle/backup/%u';Starting backup at 25-1ÔÂ -07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/opt/oracle/oradata/orcl/system01.dbf
input datafile fno=00003 name=/opt/oracle/oradata/orcl/sysaux01.dbf
input datafile fno=00002 name=/opt/oracle/oradata/orcl/undotbs01.dbf
input datafile fno=00004 name=/opt/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 25-1ÔÂ -07
channel ORA_DISK_1: finished piece 1 at 25-1ÔÂ -07
piece handle=/home/oracle/backup/06i8de4s tag=TAG20070125T164100 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 25-1ÔÂ -07
channel ORA_DISK_1: finished piece 1 at 25-1ÔÂ -07
piece handle=/home/oracle/backup/07i8de69 tag=TAG20070125T164100 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 25-1ÔÂ -07RMAN> quit
[oracle@test]$ dbsthut
rm /opt/oracle/oradata/orcl/* -rf
[oracle@test]$ dbstart
Processing Database instance "orcl": log file /opt/oracle/product/10.2.0/db_1/startup.log
Processing Database instance "rman": log file /opt/oracle/product/10.2.0/db_1/startup.log
[oracle@test]$ rman target / catalog rman/rman@rmanRecovery Manager: Release 10.2.0.1.0 - Production on ÐÇÆÚËÄ 1ÔÂ 25 16:51:34 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: orclRMAN> restore controlfile;Starting restore at 25-1ÔÂ -07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISKchannel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/07i8de69
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/backup/07i8de69 tag=TAG20070125T164100
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/opt/oracle/oradata/orcl/control01.ctl
output filename=/opt/oracle/oradata/orcl/control02.ctl
output filename=/opt/oracle/oradata/orcl/control03.ctl
Finished restore at 25-1ÔÂ -07RMAN> restore database;Starting restore at 25-1ÔÂ -07
using channel ORA_DISK_1channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /opt/oracle/oradata/orcl/system01.dbf
restoring datafile 00002 to /opt/oracle/oradata/orcl/undotbs01.dbf
restoring datafile 00003 to /opt/oracle/oradata/orcl/sysaux01.dbf
restoring datafile 00004 to /opt/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/06i8de4s
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/backup/06i8de4s tag=TAG20070125T164100
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 25-1ÔÂ -07
RMAN> alter database mount;database mounted
released channel: ORA_DISK_1RMAN> recover database;Starting recover at 25-1ÔÂ -07
Starting implicit crosscheck backup at 25-1ÔÂ -07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 2 objects
Finished implicit crosscheck backup at 25-1ÔÂ -07Starting implicit crosscheck copy at 25-1ÔÂ -07
using channel ORA_DISK_1
Crosschecked 4 objects
Finished implicit crosscheck copy at 25-1ÔÂ -07searching for all files in the recovery area
cataloging files...
cataloging doneList of Cataloged Files
=======================
File Name: /opt/oracle/flash_recovery_area/ORCL/backupset/2007_01_25/o1_mf_nnnd1_TAG20070125T164151_2vjvbkmh_.bkpusing 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: /opt/oracle/oradata/orcl/system01.dbf
destination for restore of datafile 00002: /opt/oracle/oradata/orcl/undotbs01.dbf
destination for restore of datafile 00003: /opt/oracle/oradata/orcl/sysaux01.dbf
destination for restore of datafile 00004: /opt/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /opt/oracle/flash_recovery_area/ORCL/backupset/2007_01_25/o1_mf_nnnd1_TAG20070125T164151_2vjvbkmh_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/opt/oracle/flash_recovery_area/ORCL/backupset/2007_01_25/o1_mf_nnnd1_TAG20070125T164151_2vjvbkmh_.bkp tag=TAG20070125T164151
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16starting media recoveryunable to find archive log
archive log thread=1 sequence=3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/25/2007 16:53:55
RMAN-06054: media recovery requesting unknown log: thread 1 seq 3 lowscn 477629RMAN> alter database open resetlogs;RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 01/25/2007 16:54:09
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system01.dbf'
操作如下:[oracle@test]$ rman target / catalog rman/rman@rmanRecovery Manager: Release 10.2.0.1.0 - Production on ÐÇÆÚËÄ 1ÔÂ 25 16:40:30 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: ORCL (DBID=1140318224)
connected to recovery catalog databaseRMAN> backup incremental level=0 database format '/home/oracle/backup/%u';Starting backup at 25-1ÔÂ -07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/opt/oracle/oradata/orcl/system01.dbf
input datafile fno=00003 name=/opt/oracle/oradata/orcl/sysaux01.dbf
input datafile fno=00002 name=/opt/oracle/oradata/orcl/undotbs01.dbf
input datafile fno=00004 name=/opt/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 25-1ÔÂ -07
channel ORA_DISK_1: finished piece 1 at 25-1ÔÂ -07
piece handle=/home/oracle/backup/06i8de4s tag=TAG20070125T164100 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 25-1ÔÂ -07
channel ORA_DISK_1: finished piece 1 at 25-1ÔÂ -07
piece handle=/home/oracle/backup/07i8de69 tag=TAG20070125T164100 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 25-1ÔÂ -07RMAN> quit
[oracle@test]$ dbsthut
rm /opt/oracle/oradata/orcl/* -rf
[oracle@test]$ dbstart
Processing Database instance "orcl": log file /opt/oracle/product/10.2.0/db_1/startup.log
Processing Database instance "rman": log file /opt/oracle/product/10.2.0/db_1/startup.log
[oracle@test]$ rman target / catalog rman/rman@rmanRecovery Manager: Release 10.2.0.1.0 - Production on ÐÇÆÚËÄ 1ÔÂ 25 16:51:34 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: orclRMAN> restore controlfile;Starting restore at 25-1ÔÂ -07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISKchannel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/07i8de69
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/backup/07i8de69 tag=TAG20070125T164100
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/opt/oracle/oradata/orcl/control01.ctl
output filename=/opt/oracle/oradata/orcl/control02.ctl
output filename=/opt/oracle/oradata/orcl/control03.ctl
Finished restore at 25-1ÔÂ -07RMAN> restore database;Starting restore at 25-1ÔÂ -07
using channel ORA_DISK_1channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /opt/oracle/oradata/orcl/system01.dbf
restoring datafile 00002 to /opt/oracle/oradata/orcl/undotbs01.dbf
restoring datafile 00003 to /opt/oracle/oradata/orcl/sysaux01.dbf
restoring datafile 00004 to /opt/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/06i8de4s
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/backup/06i8de4s tag=TAG20070125T164100
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 25-1ÔÂ -07
RMAN> alter database mount;database mounted
released channel: ORA_DISK_1RMAN> recover database;Starting recover at 25-1ÔÂ -07
Starting implicit crosscheck backup at 25-1ÔÂ -07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 2 objects
Finished implicit crosscheck backup at 25-1ÔÂ -07Starting implicit crosscheck copy at 25-1ÔÂ -07
using channel ORA_DISK_1
Crosschecked 4 objects
Finished implicit crosscheck copy at 25-1ÔÂ -07searching for all files in the recovery area
cataloging files...
cataloging doneList of Cataloged Files
=======================
File Name: /opt/oracle/flash_recovery_area/ORCL/backupset/2007_01_25/o1_mf_nnnd1_TAG20070125T164151_2vjvbkmh_.bkpusing 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: /opt/oracle/oradata/orcl/system01.dbf
destination for restore of datafile 00002: /opt/oracle/oradata/orcl/undotbs01.dbf
destination for restore of datafile 00003: /opt/oracle/oradata/orcl/sysaux01.dbf
destination for restore of datafile 00004: /opt/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /opt/oracle/flash_recovery_area/ORCL/backupset/2007_01_25/o1_mf_nnnd1_TAG20070125T164151_2vjvbkmh_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/opt/oracle/flash_recovery_area/ORCL/backupset/2007_01_25/o1_mf_nnnd1_TAG20070125T164151_2vjvbkmh_.bkp tag=TAG20070125T164151
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16starting media recoveryunable to find archive log
archive log thread=1 sequence=3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/25/2007 16:53:55
RMAN-06054: media recovery requesting unknown log: thread 1 seq 3 lowscn 477629RMAN> alter database open resetlogs;RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 01/25/2007 16:54:09
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system01.dbf'
RMAN> list backup
2> ;
List of Backup Sets
===================BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
29 Incr 0 534.77M DISK 00:00:43 25-1ÔÂ -07
BP Key: 33 Status: AVAILABLE Compressed: NO Tag: TAG20070125T164100
Piece Name: /home/oracle/backup/06i8de4s
List of Datafiles in backup set 29
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ---------- ----
1 0 Incr 477483 25-1ÔÂ -07 /opt/oracle/oradata/orcl/system01.dbf
2 0 Incr 477483 25-1ÔÂ -07 /opt/oracle/oradata/orcl/undotbs01.dbf
3 0 Incr 477483 25-1ÔÂ -07 /opt/oracle/oradata/orcl/sysaux01.dbf
4 0 Incr 477483 25-1ÔÂ -07 /opt/oracle/oradata/orcl/users01.dbfBS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
30 Incr 0 6.80M DISK 00:00:02 25-1ÔÂ -07
BP Key: 34 Status: AVAILABLE Compressed: NO Tag: TAG20070125T164100
Piece Name: /home/oracle/backup/07i8de69
Control File Included: Ckp SCN: 477629 Ckp time: 25-1ÔÂ -07
SPFILE Included: Modification time: 25-1ÔÂ -07BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
52 Incr 1 31.73M DISK 00:00:00 25-1ÔÂ -07
BP Key: 53 Status: AVAILABLE Compressed: NO Tag: TAG20070125T164151
Piece Name: /opt/oracle/flash_recovery_area/ORCL/backupset/2007_01_25/o1_mf_nnnd1_TAG20070125T164151_2vjvbkmh_.bkp
List of Datafiles in backup set 52
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ---------- ----
1 1 Incr 478458 25-1ÔÂ -07 /opt/oracle/oradata/orcl/system01.dbf
2 1 Incr 478458 25-1ÔÂ -07 /opt/oracle/oradata/orcl/undotbs01.dbf
3 1 Incr 478458 25-1ÔÂ -07 /opt/oracle/oradata/orcl/sysaux01.dbf
4 1 Incr 478458 25-1ÔÂ -07 /opt/oracle/oradata/orcl/users01.dbf
第二次做实验时在备份前把这个数据库的undotbs重建了,按照上面流程走一边也没有问题。难道是undotbs有什么问题