磁碟損壞導致資料檔案丟失的恢復
如果磁碟損壞了,那麼我們怎麼將備份的資料檔案恢復到新的位置呢?下面我們做個試驗:
報錯資訊:
SQL> shutdown immediate;
ORA-01116: error in opening database file 6
ORA-01110: data file 6: '/u01/app/oracle/oradata/orcl/test01.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
使用rman進行恢復:
[oracle@localhost ~]$ rman target / nocatalog
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Aug 21 23:06:30 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1383986269)
using target database control file instead of recovery catalog
RMAN> report schema;
Report of database schema for database with db_unique_name ORCL
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 680 SYSTEM *** /u01/app/oracle/oradata/orcl/system01.dbf
2 490 SYSAUX *** /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 60 UNDOTBS1 *** /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 5 USERS *** /u01/app/oracle/oradata/orcl/users01.dbf
5 100 EXAMPLE *** /u01/app/oracle/oradata/orcl/example01.dbf
6 0 TEST *** /u01/app/oracle/oradata/orcl/test01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 20 TEMP 32767 /u01/app/oracle/oradata/orcl/temp01.dbf
RMAN> run{
2> set newname for datafile 6 to '/u01/app/datafile/test01.dbf';
3> restore datafile 6;
4> switch datafile all;
5> recover datafile 6;
6> }
executing command: SET NEWNAME
Starting restore at 21-AUG-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00006 to /u01/app/datafile/test01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0bpghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0bpghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 21-AUG-14
datafile 6 switched to datafile copy
input datafile copy RECID=3 STAMP=856220997 file name=/u01/app/datafile/test01.dbf
Starting recover at 21-AUG-14
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 21-AUG-14
報錯資訊:
SQL> shutdown immediate;
ORA-01116: error in opening database file 6
ORA-01110: data file 6: '/u01/app/oracle/oradata/orcl/test01.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
[oracle@localhost ~]$ rman target / nocatalog
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Aug 21 23:06:30 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1383986269)
using target database control file instead of recovery catalog
RMAN> report schema;
Report of database schema for database with db_unique_name ORCL
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 680 SYSTEM *** /u01/app/oracle/oradata/orcl/system01.dbf
2 490 SYSAUX *** /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 60 UNDOTBS1 *** /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 5 USERS *** /u01/app/oracle/oradata/orcl/users01.dbf
5 100 EXAMPLE *** /u01/app/oracle/oradata/orcl/example01.dbf
6 0 TEST *** /u01/app/oracle/oradata/orcl/test01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 20 TEMP 32767 /u01/app/oracle/oradata/orcl/temp01.dbf
RMAN> run{
2> set newname for datafile 6 to '/u01/app/datafile/test01.dbf';
3> restore datafile 6;
4> switch datafile all;
5> recover datafile 6;
6> }
executing command: SET NEWNAME
Starting restore at 21-AUG-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00006 to /u01/app/datafile/test01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0bpghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0bpghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 21-AUG-14
datafile 6 switched to datafile copy
input datafile copy RECID=3 STAMP=856220997 file name=/u01/app/datafile/test01.dbf
Starting recover at 21-AUG-14
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 21-AUG-14
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29800581/viewspace-1255960/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資料檔案丟失損壞的恢復--
- rman 恢復---歸檔丟失and資料檔案損壞
- REDO檔案丟失或者損壞的恢復
- 備份與恢復--資料檔案損壞或丟失
- RMAN_部分資料檔案丟失或者損壞的恢復
- 磁碟損壞,system及部分資料檔案丟失
- Oracle不同檔案丟失/損壞的恢復方法Oracle
- 資料檔案損壞、丟失
- 探索ORACLE之RMAN_07 磁碟損壞資料丟失恢復Oracle
- 【北亞資料恢復】誤操作分割槽損壞導致SqlServer資料庫資料丟失的資料恢復資料恢復SQLServer資料庫
- INDEX表空間檔案丟失或者損壞的恢復Index
- coreldraw檔案丟失(損壞)的恢復處理辦法
- 資料庫檔案壞塊損壞導致開啟時報錯的恢復方法資料庫
- Oracle重做日誌檔案損壞或丟失後的恢復Oracle
- RMAN_資料庫的絕大部分資料檔案丟失或者損壞的恢復資料庫
- 資料檔案丟失的恢復
- oracle控制檔案的損壞或完全丟失的恢復辦法Oracle
- TEMP表空間的檔案丟失或損壞後的恢復
- 【Vsan資料恢復】斷電導致Vsan分散式儲存虛擬磁碟檔案丟失的資料恢復案例資料恢復分散式
- Recovery from missing or corrupted datafile(多個資料檔案丟失或者損壞的恢復)
- 備份&恢復之五:歸檔模式下丟失或損壞一個資料檔案模式
- 資料檔案丟失如何恢復
- 【伺服器資料恢復】斷電導致raid資訊丟失的磁碟陣列資料恢復案例伺服器資料恢復AI陣列
- undo檔案丟失或損壞
- u盤檔案損壞怎麼恢復資料 u盤恢復損壞資料的有效方法
- 伺服器資料恢復—raid5磁碟離線導致SAP資料丟失的資料恢復案例伺服器資料恢復AI
- 【伺服器資料恢復】SAN LUN對映出錯導致檔案系統資料丟失的資料恢復案例伺服器資料恢復
- RMAN恢復案例:丟失全部資料檔案恢復
- RMAN完全恢復丟失的資料檔案
- 普通資料檔案丟失的恢復方法
- 儲存互斥失敗導致資料丟失的資料恢復成功案例資料恢復
- 2.7.10 恢復丟失或損壞的伺服器引數檔案(SPFILE)伺服器
- 磁碟檔案丟失應該怎麼恢復
- 【Vsan資料恢復】非正常關機導致vsan儲存架構中虛擬機器磁碟檔案丟失的資料恢復資料恢復架構虛擬機
- 【伺服器資料恢復】虛擬機器檔案丟失導致Hyper-V癱瘓的資料恢復伺服器資料恢復虛擬機
- 伺服器資料恢復—重灌系統導致XFS檔案系統分割槽丟失的資料恢復案例伺服器資料恢復
- RAID5的硬碟損壞,會發生什麼?多少塊磁碟損壞會導致RAID5資料丟失AI硬碟
- 【北亞資料恢復】伺服器raid陣列癱瘓導致ZFS檔案系統元檔案損壞的資料恢復資料恢復伺服器AI陣列