9I R2控制檔案沒有單獨備份時,恢復時會找不到備份集
C:\Documents and Settings\Paul Yi>rman target /
Recovery Manager: Release 9.2.0.8.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: PUBTEST (DBID=799229701)
RMAN> backup database include current controlfile;
Starting backup at 10-JUN-08
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00001 name=D:\ORACLE\ORADATA\PUBTEST\SYSTEM01.DBF
input datafile fno=00002 name=D:\ORACLE\ORADATA\PUBTEST\UNDOTBS01.DBF
input datafile fno=00004 name=D:\ORACLE\ORADATA\PUBTEST\INDX01.DBF
input datafile fno=00006 name=D:\ORACLE\ORADATA\PUBTEST\USERS01.DBF
input datafile fno=00005 name=D:\ORACLE\ORADATA\PUBTEST\TOOLS01.DBF
input datafile fno=00003 name=D:\ORACLE\ORADATA\PUBTEST\EXAMPLE01.DBF
channel ORA_DISK_1: starting piece 1 at 10-JUN-08
channel ORA_DISK_1: finished piece 1 at 10-JUN-08
piece handle=D:\BACKUP\3SJIJA02_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:36
Finished backup at 10-JUN-08
RMAN> exit
Recovery Manager complete.
C:\Documents and Settings\Paul Yi>sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.8.0 - Production on Tue Jun 10 15:39:33 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL> shutdown abort;
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
C:\Documents and Settings\Paul Yi>sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.8.0 - Production on Tue Jun 10 15:39:46 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> exit
Disconnected
C:\Documents and Settings\Paul Yi>rman target /
Recovery Manager: Release 9.2.0.8.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 101785012 bytes
Fixed Size 454068 bytes
Variable Size 75497472 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
RMAN> restore controlfile from 'd:\backup\3SJIJA02_1_1';
Starting restore at 10-JUN-08
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=11 devtype=DISK
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
replicating controlfile
input filename=D:\ORACLE\ORADATA\PUBTEST\CONTROL01.CTL
output filename=D:\ORACLE\ORADATA\PUBTEST\CONTROL02.CTL
output filename=D:\ORACLE\ORADATA\PUBTEST\CONTROL03.CTL
Finished restore at 10-JUN-08
RMAN> alter database mount;
database mounted
RMAN> restore database;
Starting restore at 10-JUN-08
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/10/2008 15:41:07
RMAN-06026: some targets not found - aborting 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>
因為這是在備份資料檔案前備份控制檔案的,所以控制檔案的備份沒包括最新的備份集資訊,導致恢復失敗
這種情況下的恢復只能透過dbms_backup_restore包了 ,或著啟用控制檔案自動備份的引數為on
以下是測試過程:
C:\Documents and Settings\Paul Yi>rman target /
Recovery Manager: Release 9.2.0.8.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: PUBTEST (DBID=799229701)
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'd:\backup\%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'd:\backup\%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORACLE\ORA92\DATABASE\SNCFPUBTEST.ORA
'; # default
RMAN> configure controlfile autobackup on;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
RMAN> backup database;
Starting backup at 10-JUN-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=D:\ORACLE\ORADATA\PUBTEST\SYSTEM01.DBF
input datafile fno=00002 name=D:\ORACLE\ORADATA\PUBTEST\UNDOTBS01.DBF
input datafile fno=00004 name=D:\ORACLE\ORADATA\PUBTEST\INDX01.DBF
input datafile fno=00006 name=D:\ORACLE\ORADATA\PUBTEST\USERS01.DBF
input datafile fno=00005 name=D:\ORACLE\ORADATA\PUBTEST\TOOLS01.DBF
input datafile fno=00003 name=D:\ORACLE\ORADATA\PUBTEST\EXAMPLE01.DBF
channel ORA_DISK_1: starting piece 1 at 10-JUN-08
channel ORA_DISK_1: finished piece 1 at 10-JUN-08
piece handle=D:\BACKUP\3UJIJBK6_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 10-JUN-08
Starting Control File and SPFILE Autobackup at 10-JUN-08
piece handle=D:\BACKUP\C-799229701-20080610-05 comment=NONE
Finished Control File and SPFILE Autobackup at 10-JUN-08
RMAN>
C:\Documents and Settings\Paul Yi>sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.8.0 - Production on Tue Jun 10 15:59:57 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL> shutdown abort;
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
C:\Documents and Settings\Paul Yi>rman target /
Recovery Manager: Release 9.2.0.8.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 101785012 bytes
Fixed Size 454068 bytes
Variable Size 75497472 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
RMAN> restore controlfile from 'd:\backup\C-799229701-20080610-05';
Starting restore at 10-JUN-08
using channel ORA_DISK_1
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
replicating controlfile
input filename=D:\ORACLE\ORADATA\PUBTEST\CONTROL01.CTL
output filename=D:\ORACLE\ORADATA\PUBTEST\CONTROL02.CTL
output filename=D:\ORACLE\ORADATA\PUBTEST\CONTROL03.CTL
Finished restore at 10-JUN-08
RMAN> alter database mount;
database mounted
RMAN> restore database;
Starting restore at 10-JUN-08
using channel ORA_DISK_1
skipping datafile 1; already restored to file D:\ORACLE\ORADATA\PUBTEST\SYSTEM01
.DBF
skipping datafile 2; already restored to file D:\ORACLE\ORADATA\PUBTEST\UNDOTBS0
1.DBF
skipping datafile 3; already restored to file D:\ORACLE\ORADATA\PUBTEST\EXAMPLE0
1.DBF
skipping datafile 4; already restored to file D:\ORACLE\ORADATA\PUBTEST\INDX01.D
BF
skipping datafile 5; already restored to file D:\ORACLE\ORADATA\PUBTEST\TOOLS01.
DBF
skipping datafile 6; already restored to file D:\ORACLE\ORADATA\PUBTEST\USERS01.
DBF
restore not done; all files readonly, offline, or already restored
Finished restore at 10-JUN-08
RMAN> recover database;
Starting recover at 10-JUN-08
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 1 is already on disk as file D:\ORACLE\ORADATA\PUB
TEST\REDO3_01.LOG
archive log filename=D:\ORACLE\ORADATA\PUBTEST\REDO3_01.LOG thread=1 sequence=1
media recovery complete
Finished recover at 10-JUN-08
RMAN> alter database open;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 06/10/2008 16:02:21
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
RMAN> alter database open resetlogs;
database opened
可以看到控制檔案的備份是在備份集備份後才備份的,所以包含有備份集資訊可以成功恢復
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-343277/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 備份與恢復--利用備份的控制檔案恢復
- 備份與恢復系列 十一 控制檔案的備份與恢復
- 【備份恢復】利用 備份控制檔案到指定目錄下的控制檔案 恢復控制檔案
- 沒有備份的資料檔案恢復(五)
- 【備份恢復】 控制檔案多路徑
- 利用備份的控制檔案恢復
- 備份與恢復--重建控制檔案
- 控制檔案的備份和恢復
- 10g R2 rman backup database 控制檔案備份後於備份集備份Database
- 只有rman備份集,控制檔案丟失的恢復
- 【備份恢復】所有控制檔案丟失後 利用trace中的控制檔案備份執行恢復
- 歸檔模式,恢復沒有備份的資料檔案模式
- rman備份-(1) 利用備份級恢復資料檔案和控制檔案
- rman備份丟失控制檔案恢復
- 備份&恢復之十二:損壞單個控制檔案
- RMAN備份恢復之控制檔案的恢復(三)
- RMAN備份恢復之控制檔案的恢復(二)
- RMAN備份恢復之控制檔案的恢復(一)
- 使用舊的控制檔案備份來恢復控制檔案
- oralce備份與恢復1 控制檔案(轉)
- trace檔案備份控制檔案並執行恢復
- Oracle備份與恢復【丟失控制檔案的恢復】Oracle
- 備份之控制檔案備份
- 【備份與恢復】控制檔案的恢復(不完全恢復)
- rman給歸檔指定備份位置;庫先備份盤同時到帶庫;更改控制檔案自備路徑;時間點的恢復
- 【備份恢復】無備份線上恢復非關鍵資料檔案
- 沒有自動備份的情況下控制檔案全部丟失的恢復
- 【備份恢復】 丟失一個控制檔案 之恢復操作
- 【rman 備份與恢復】恢復丟失所有的控制檔案
- 【備份與恢復】恢復受損的複用控制檔案
- 使用備份的控制檔案恢復資料庫資料庫
- 備份&恢復之十三:損壞全部控制檔案
- RMAN基於備份控制檔案恢復失敗
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- Oracle 9i備份和恢復Oracle
- 備份與恢復(Parameter 檔案恢復篇)
- 備份與恢復系列 十 引數檔案spfile的備份與恢復
- 詳解叢集級備份恢復:物理細粒度備份恢復