rman恢復控制檔案測試--log
環境:Oracle 11.2.0.4 64bit RedHat 6.5 64 bit
[oracle@rhel ~]$ rman target / catalog rman/
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 20 04:58:47 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ANDREW (DBID=2602015135)
recovery catalog database Password:
connected to recovery catalog database
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
3752 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3753 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3754 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3755 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3757 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3796 B A A DISK 20-JUN-14 1 1 NO ARCH-LOG
3798 B A A DISK 20-JUN-14 1 1 NO ARCH-LOG
3834 B F A DISK 20-JUN-14 1 1 NO CTR-FILE
[oracle@rhel ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 20 05:32:39 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN>
RMAN> startup nomount;
Oracle instance started
Total System Global Area 659730432 bytes
Fixed Size 2256152 bytes
Variable Size 415236840 bytes
Database Buffers 239075328 bytes
Redo Buffers 3162112 bytes
RMAN> set dbid=2602015135
executing command: SET DBID
RMAN> restore controlfile;
Starting restore at 20-JUN-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/20/2014 05:34:48
RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP
RMAN> restore controlfile from autobackup;
Starting restore at 20-JUN-14
using channel ORA_DISK_1
recovery area destination: /u01/app/oracle/recovey_area
database name (or database unique name) used for search: ANDREW
channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140620
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140619
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140618
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140617
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140616
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140615
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140614
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/20/2014 05:35:15
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
RMAN> restore controlfile from '/u01/app/oracle/recovey_area/ANDREW/backupset/2014_06_20/o1_mf_ncnnf_TAG20140620T052841_9t7zpbg7_.bkp'
2> ;
Starting restore at 20-JUN-14
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/ANDREW/control01.ctl
output file name=/u01/app/oracle/recovey_area/ANDREW/control02.ctl
Finished restore at 20-JUN-14
RMAN> sql 'alter database mount';
sql statement: alter database mount
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 20-JUN-14
Starting implicit crosscheck backup at 20-JUN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=20 device type=DISK
Crosschecked 8 objects
Finished implicit crosscheck backup at 20-JUN-14
Starting implicit crosscheck copy at 20-JUN-14
using channel ORA_DISK_1
using channel ORA_DISK_2
.........
channel ORA_DISK_1: restore complete, elapsed time: 00:01:10
Finished restore at 20-JUN-14
RMAN> recover database;
Starting recover at 20-JUN-14
using channel ORA_DISK_1
using channel ORA_DISK_2
starting media recovery
.........
media recovery complete, elapsed time: 00:00:02
Finished recover at 20-JUN-14
RMAN> sql 'alter database open';
sql statement: alter database open
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 06/20/2014 05:42:58
RMAN-11003: failure during parse/execution of SQL statement: alter database open
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
[oracle@rhel ~]$ oerr ora 01589
01589, 00000, "must use RESETLOGS or NORESETLOGS option for database open"
// *Cause: Either incomplete or backup control file recovery has been
// performed. After these types of recovery you must specify either
// the RESETLOGS option or the NORESETLOGS option to open your
// database.
// *Action: Specify the appropriate option.
RMAN> sql 'alter database open NORESETLOGS';
sql statement: alter database open NORESETLOGS
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 06/20/2014 05:43:55
RMAN-11003: failure during parse/execution of SQL statement: alter database open NORESETLOGS
ORA-01588: must use RESETLOGS option for database open
[oracle@rhel]$ oerr ora 01588
01588, 00000, "must use RESETLOGS option for database open"
// *Cause: An earlier attempt to open the database with the RESETLOGS option
// did not complete, or recovery was done with a control file backup,
// or a FLASHBACK DATABASE was done.
// *Action: Use the RESETLOGS option when opening the database.
RMAN> sql 'alter database open RESETLOGS';
sql statement: alter database open RESETLOGS
----
SQL*Plus: Release 11.2.0.4.0 Production on Fri Jun 20 05:47:25 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next log sequence to archive 1
Current log sequence 1
SQL> select DBID,name,CREATED,RESETLOGS_CHANGE#,LOG_MODE,CURRENT_SCN from v$database;
DBID NAME CREATED RESETLOGS_CHANGE# LOG_MODE CURRENT_SCN
---------- --------- --------- ----------------- ------------ -----------
2602015135 ANDREW 13-MAR-14 1564776 ARCHIVELOG 1570849
[oracle@rhel ~]$ rman target / catalog rman/
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 20 04:58:47 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ANDREW (DBID=2602015135)
recovery catalog database Password:
connected to recovery catalog database
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
3752 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3753 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3754 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3755 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3757 B 0 A DISK 20-JUN-14 1 1 NO WHOLE-DB
3796 B A A DISK 20-JUN-14 1 1 NO ARCH-LOG
3798 B A A DISK 20-JUN-14 1 1 NO ARCH-LOG
3834 B F A DISK 20-JUN-14 1 1 NO CTR-FILE
[oracle@rhel ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 20 05:32:39 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN>
RMAN> startup nomount;
Oracle instance started
Total System Global Area 659730432 bytes
Fixed Size 2256152 bytes
Variable Size 415236840 bytes
Database Buffers 239075328 bytes
Redo Buffers 3162112 bytes
RMAN> set dbid=2602015135
executing command: SET DBID
RMAN> restore controlfile;
Starting restore at 20-JUN-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/20/2014 05:34:48
RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP
RMAN> restore controlfile from autobackup;
Starting restore at 20-JUN-14
using channel ORA_DISK_1
recovery area destination: /u01/app/oracle/recovey_area
database name (or database unique name) used for search: ANDREW
channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140620
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140619
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140618
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140617
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140616
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140615
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140614
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/20/2014 05:35:15
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
RMAN> restore controlfile from '/u01/app/oracle/recovey_area/ANDREW/backupset/2014_06_20/o1_mf_ncnnf_TAG20140620T052841_9t7zpbg7_.bkp'
2> ;
Starting restore at 20-JUN-14
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/ANDREW/control01.ctl
output file name=/u01/app/oracle/recovey_area/ANDREW/control02.ctl
Finished restore at 20-JUN-14
RMAN> sql 'alter database mount';
sql statement: alter database mount
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 20-JUN-14
Starting implicit crosscheck backup at 20-JUN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=20 device type=DISK
Crosschecked 8 objects
Finished implicit crosscheck backup at 20-JUN-14
Starting implicit crosscheck copy at 20-JUN-14
using channel ORA_DISK_1
using channel ORA_DISK_2
.........
channel ORA_DISK_1: restore complete, elapsed time: 00:01:10
Finished restore at 20-JUN-14
RMAN> recover database;
Starting recover at 20-JUN-14
using channel ORA_DISK_1
using channel ORA_DISK_2
starting media recovery
.........
media recovery complete, elapsed time: 00:00:02
Finished recover at 20-JUN-14
RMAN> sql 'alter database open';
sql statement: alter database open
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 06/20/2014 05:42:58
RMAN-11003: failure during parse/execution of SQL statement: alter database open
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
[oracle@rhel ~]$ oerr ora 01589
01589, 00000, "must use RESETLOGS or NORESETLOGS option for database open"
// *Cause: Either incomplete or backup control file recovery has been
// performed. After these types of recovery you must specify either
// the RESETLOGS option or the NORESETLOGS option to open your
// database.
// *Action: Specify the appropriate option.
RMAN> sql 'alter database open NORESETLOGS';
sql statement: alter database open NORESETLOGS
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 06/20/2014 05:43:55
RMAN-11003: failure during parse/execution of SQL statement: alter database open NORESETLOGS
ORA-01588: must use RESETLOGS option for database open
[oracle@rhel]$ oerr ora 01588
01588, 00000, "must use RESETLOGS option for database open"
// *Cause: An earlier attempt to open the database with the RESETLOGS option
// did not complete, or recovery was done with a control file backup,
// or a FLASHBACK DATABASE was done.
// *Action: Use the RESETLOGS option when opening the database.
RMAN> sql 'alter database open RESETLOGS';
sql statement: alter database open RESETLOGS
----
SQL*Plus: Release 11.2.0.4.0 Production on Fri Jun 20 05:47:25 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next log sequence to archive 1
Current log sequence 1
SQL> select DBID,name,CREATED,RESETLOGS_CHANGE#,LOG_MODE,CURRENT_SCN from v$database;
DBID NAME CREATED RESETLOGS_CHANGE# LOG_MODE CURRENT_SCN
---------- --------- --------- ----------------- ------------ -----------
2602015135 ANDREW 13-MAR-14 1564776 ARCHIVELOG 1570849
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21754115/viewspace-1190252/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【管理篇備份恢復】rman恢復測試(二) 控制檔案恢復(三)
- 【管理篇備份恢復】rman恢復測試(二) 控制檔案恢復(二)
- 【管理篇備份恢復】rman恢復測試(二) 控制檔案恢復(一)
- 控制檔案恢復測試
- rman備份恢復-rman恢復資料檔案測試
- RMAN恢復控制檔案
- 使用rman恢復控制檔案
- rman恢復--丟失控制檔案的恢復
- RMAN備份與恢復(新舊控制檔案及歸檔日誌)測試
- 測試恢復5==使用2進位制形式檔案恢復控制檔案
- RMAN - "丟失控制檔案的恢復"
- 控制檔案丟失的RMAN恢復
- RMAN備份與恢復(新舊控制檔案及歸檔日誌)測試(敘)
- RMAN備份恢復之控制檔案的恢復(三)
- RMAN備份恢復之控制檔案的恢復(二)
- RMAN備份恢復之控制檔案的恢復(一)
- 控制檔案快照和rman利用快照恢復
- RMAN 恢復之控制檔案篇(1/5)
- RMAN 恢復之控制檔案篇(2/5)
- RMAN 恢復之控制檔案篇(3/5)
- RMAN 恢復之控制檔案篇(4/5)
- RMAN 恢復之控制檔案篇(5/5)
- rman備份丟失控制檔案恢復
- Oracle RMAN恢復測試Oracle
- 重建控制檔案的恢復(noresetlogs)
- RMAN恢復 執行重要檔案RMAN恢復
- RMAN恢復案例:無恢復目錄,丟失全部資料檔案、控制檔案、日誌檔案恢復
- rman 恢復機制與恢復測試
- 【rman 備份與恢復】恢復丟失所有的控制檔案
- 【管理篇備份恢復】rman恢復測試(一) 表空間資料檔案
- 【RMAN】如果控制檔案損壞那麼如何恢復?恢復控制檔案的方式有哪幾種?
- oracle實驗記錄 (恢復-rman基於控制檔案的恢復)Oracle
- 資料檔案或者tablespace損壞基於rman恢復測試
- 恢復測試:擁有當時的全部歸檔,控制檔案,恢復丟失的資料檔案。
- rman恢復控制檔案的一個小錯誤
- RMAN基於備份控制檔案恢復失敗
- rman恢復spfile和control和resetlogs建立控制檔案和不完全恢復疑點
- 控制檔案恢復—從trace檔案中恢復