RMAN恢復案例:無恢復目錄,丟失全部資料檔案、控制檔案、日誌檔案恢復
RMAN恢復案例:無恢復目錄,丟失全部資料檔案、控制檔案、日誌檔案恢復
1、模擬介質損壞:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> host ls /u01/oracle/oradata/XUE
archive control02.ctl indx01.dbf redo02.log undotbs01.dbf
control01.ctl control03.ctl redo01.log system01.dbf users01.dbf
SQL> host rm /u01/oracle/oradata/XUE/*.log
SQL> host rm /u01/oracle/oradata/XUE/*.dbf
SQL> host rm /u01/oracle/oradata/XUE/*ctl
SQL> host ls /u01/oracle/oradata/XUE
archive
2、啟動報錯:
SQL> startup
ORACLE instance started.
Total System Global Area 64033912 bytes
Fixed Size 451704 bytes
Variable Size 37748736 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
ORA-00205: error in identifying controlfile, check alert log for more info
3、進行控制檔案還原:
[oracle@Linux1 rman_backup]$ rman target /
Recovery Manager: Release 9.2.0.4.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: XUE (not mounted)
RMAN> set DBID=285819149
RMAN> restore controlfile from '/opt/rman_backup/control.bak';
Starting restore at 05-JAN-05
using channel ORA_DISK_1
channel ORA_DISK_1: copied controlfile copy
replicating controlfile
input filename=/u01/oracle/oradata/XUE/control01.ctl
output filename=/u01/oracle/oradata/XUE/control02.ctl
output filename=/u01/oracle/oradata/XUE/control03.ctl
Finished restore at 05-JAN-05
4、裝載資料庫:
RMAN> alter database mount;
database mounted
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 200M DISK 00:01:21 24-DEC-04
BP Key: 1 Status: AVAILABLE Tag: TAG20041224T094925
Piece Name: /u01/oracle/oradata/rman_backup/db.dbf
SPFILE Included: Modification time: 24-DEC-04
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 251176 24-DEC-04 /u01/oracle/oradata/XUE/system01.dbf
2 Full 251176 24-DEC-04 /u01/oracle/oradata/XUE/undotbs01.dbf
3 Full 251176 24-DEC-04 /u01/oracle/oradata/XUE/indx01.dbf
4 Full 251176 24-DEC-04 /u01/oracle/oradata/XUE/users01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 72K DISK 00:00:03 31-DEC-04
BP Key: 2 Status: AVAILABLE Tag: TAG20041231T114559
Piece Name: /u01/oracle/product/9.2.0/dbs/df_546349559_3_1
List of Datafiles in backup set 2
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
4 Full 388777 26-DEC-04 /u01/oracle/oradata/XUE/users01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3 Full 1M DISK 00:00:01 31-DEC-04
BP Key: 3 Status: AVAILABLE Tag:
Piece Name: /u01/oracle/product/9.2.0/dbs/c-285819149-20041231-00
SPFILE Included: Modification time: 24-DEC-04
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4 Full 176K DISK 00:00:12 04-JAN-05
BP Key: 4 Status: AVAILABLE Tag: TAG20050104T152505
Piece Name: /u01/oracle/product/9.2.0/dbs/df_546708305_5_1
List of Datafiles in backup set 4
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
3 Full 419690 04-JAN-05 /u01/oracle/oradata/XUE/indx01.dbf
4 Full 419690 04-JAN-05 /u01/oracle/oradata/XUE/users01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5 Full 74M DISK 00:00:19 04-JAN-05
BP Key: 5 Status: AVAILABLE Tag: TAG20050104T152505
Piece Name: /u01/oracle/product/9.2.0/dbs/df_546708305_6_1
List of Datafiles in backup set 5
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
2 Full 419689 04-JAN-05 /u01/oracle/oradata/XUE/undotbs01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Full 74M DISK 00:00:13 04-JAN-05
BP Key: 6 Status: AVAILABLE Tag: TAG20050104T153556
Piece Name: /opt/rman_backup/df_546708956_8_1
List of Datafiles in backup set 6
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
2 Full 420191 04-JAN-05 /u01/oracle/oradata/XUE/undotbs01.dbf
3 Full 420191 04-JAN-05 /u01/oracle/oradata/XUE/indx01.dbf
4 Full 420191 04-JAN-05 /u01/oracle/oradata/XUE/users01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Full 128M DISK 00:00:21 04-JAN-05
BP Key: 7 Status: AVAILABLE Tag: TAG20050104T153556
Piece Name: /opt/rman_backup/df_546708971_9_1
SPFILE Included: Modification time: 24-DEC-04
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 420214 04-JAN-05 /u01/oracle/oradata/XUE/system01.dbf
5、進行資料庫還原及恢復:
RMAN> restore database;
Starting restore at 05-JAN-05
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /u01/oracle/oradata/XUE/undotbs01.dbf
restoring datafile 00003 to /u01/oracle/oradata/XUE/indx01.dbf
restoring datafile 00004 to /u01/oracle/oradata/XUE/users01.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/opt/rman_backup/df_546708956_8_1 tag=TAG20050104T153556 params=NULL
channel ORA_DISK_1: restore complete
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oracle/oradata/XUE/system01.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/opt/rman_backup/df_546708971_9_1 tag=TAG20050104T153556 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 05-JAN-05
RMAN> recover database;
Starting recover at 05-JAN-05
using channel ORA_DISK_1
starting media recovery
archive log filename=/u01/oracle/oradata/XUE/archive/66.arc thread=1 sequence=66
archive log filename=/u01/oracle/oradata/XUE/archive/67.arc thread=1 sequence=67
archive log filename=/u01/oracle/oradata/XUE/archive/68.arc thread=1 sequence=68
archive log filename=/u01/oracle/oradata/XUE/archive/69.arc thread=1 sequence=69
archive log filename=/u01/oracle/oradata/XUE/archive/70.arc thread=1 sequence=70
archive log filename=/u01/oracle/oradata/XUE/archive/71.arc thread=1 sequence=71
archive log filename=/u01/oracle/oradata/XUE/archive/72.arc thread=1 sequence=72
unable to find archive log
archive log thread=1 sequence=73
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/05/2005 17:18:33
RMAN-06054: media recovery requesting unknown log: thread 1 scn 492279
6、重置日誌方式開啟資料庫,恢復成功:
RMAN> alter database open resetlogs;
database opened
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/60857/viewspace-786321/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 恢復案例:無歸檔,丟失全部控制檔案、日誌檔案恢復案例
- RMAN恢復案例:丟失全部資料檔案恢復
- 恢復案例:無歸檔,掉電,控制檔案全部丟失恢復
- 控制檔案全部丟失恢復
- 恢復案例:歸檔模式下丟失全部資料檔案的恢復模式
- RMAN恢復案例:丟失非系統資料檔案恢復
- 控制檔案全部丟失的恢復
- 【恢復】Redo日誌檔案丟失的恢復
- 控制檔案丟失的RMAN恢復
- rman恢復--丟失控制檔案的恢復
- rman恢復--歸檔模式無備份,丟失資料檔案的恢復模式
- 控制檔案丟失恢復
- 【控制檔案丟失恢復】
- 當前控制檔案全部丟失恢復
- 【備份恢復】恢復 丟失已歸檔重做日誌檔案
- 恢復測試:擁有當時的全部歸檔,控制檔案,恢復丟失的資料檔案。
- 控制檔案丟失恢復(二)
- 恢復丟失的控制檔案
- rman恢復--歸檔模式有備份,丟失資料檔案的恢復模式
- RMAN完全恢復丟失的資料檔案
- 非歸檔丟失日誌檔案的恢復
- RMAN恢復控制檔案
- rman 恢復---歸檔丟失and資料檔案損壞
- RMAN - "丟失控制檔案的恢復"
- 資料檔案丟失的恢復(改變目錄)
- 全部控制檔案丟失後的完全恢復(轉)
- 資料檔案丟失的恢復
- 資料檔案丟失如何恢復
- 丟失已歸檔日誌檔案下恢復資料庫資料庫
- oracle丟失日誌檔案的恢復( 轉)Oracle
- 控制檔案部分丟失的恢復
- rman恢復:資料檔案丟失,控制檔案丟失,聯機日誌檔案丟失(非當前使用與當前使用)
- 引數檔案控制檔案和資料檔案丟失的恢復
- RMAN資料庫恢復 之歸檔模式有(無)備份-丟失資料檔案的恢復資料庫模式
- 丟失全部控制檔案後從RMAN備份集中恢復示例
- 恢復之丟失全部控制檔案以及備份中的控制檔案
- 無備份丟失部分資料檔案和控制檔案恢復 [轉]
- 控制檔案恢復—從trace檔案中恢復