資料檔案丟失的恢復(改變目錄)
報錯資訊:
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 562040400 bytes
Database Buffers 281018368 bytes
Redo Buffers 5132288 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
檢視警報日誌檔案:
ALTER DATABASE OPEN
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: '/u01/app/oracle/oradata/orcl/sysaux01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: '/u01/app/oracle/oradata/orcl/undotbs01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/u01/app/oracle/oradata/orcl/users01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/u01/app/oracle/oradata/orcl/hh01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_28707.trc:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-1157 signalled during: ALTER DATABASE OPEN...
Tue Aug 26 00:20:44 2014
Checker run found 6 new persistent data failures
資料檔案全部丟失,下面使用rman進行恢復,並且恢復到其他目錄:
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 0 SYSTEM *** /u01/app/oracle/oradata/orcl/system01.dbf
2 0 SYSAUX *** /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 0 UNDOTBS1 *** /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 0 USERS *** /u01/app/oracle/oradata/orcl/users01.dbf
5 0 EXAMPLE *** /u01/app/oracle/oradata/orcl/example01.dbf
6 100 TEST *** /u01/app/datafile/test01.dbf
7 0 HH *** /u01/app/oracle/oradata/orcl/hh01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 0 TEMP 32767 /u01/app/oracle/oradata/orcl/temp01.dbf
RMAN> run{
2> set newname for datafile 1 to '/datafile/system01.dbf';
3> set newname for datafile 2 to '/datafile/sysaux01.dbf';
4> set newname for datafile 3 to '/datafile/undotbs01.dbf';
5> set newname for datafile 4 to '/datafile/users01.dbf';
6> set newname for datafile 5 to '/datafile/example01.dbf';
7> set newname for datafile 7 to '/datafile/hh01.dbf';
8> restore database;
9> switch datafile all;
10> recover database;
11> }
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 26-AUG-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 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 00003 to /datafile/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /datafile/example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /u01/app/datafile/test01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_1epgsem7_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_1epgsem7_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
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 00001 to /datafile/system01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_1cpgsem7_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_1cpgsem7_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
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 00002 to /datafile/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /datafile/users01.dbf
channel ORA_DISK_1: restoring datafile 00007 to /datafile/hh01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_1dpgsem7_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_1dpgsem7_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:26
Finished restore at 26-AUG-14
datafile 1 switched to datafile copy
input datafile copy RECID=22 STAMP=856571612 file name=/datafile/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=23 STAMP=856571612 file name=/datafile/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=24 STAMP=856571612 file name=/datafile/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=25 STAMP=856571612 file name=/datafile/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=26 STAMP=856571612 file name=/datafile/example01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=27 STAMP=856571612 file name=/datafile/hh01.dbf
Starting recover at 26-AUG-14
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:02
Finished recover at 26-AUG-14
開啟資料庫:
SQL> alter database open;
Database altered.
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 562040400 bytes
Database Buffers 281018368 bytes
Redo Buffers 5132288 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
檢視警報日誌檔案:
ALTER DATABASE OPEN
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: '/u01/app/oracle/oradata/orcl/sysaux01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: '/u01/app/oracle/oradata/orcl/undotbs01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/u01/app/oracle/oradata/orcl/users01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_28618.trc:
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/u01/app/oracle/oradata/orcl/hh01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_28707.trc:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-1157 signalled during: ALTER DATABASE OPEN...
Tue Aug 26 00:20:44 2014
Checker run found 6 new persistent data failures
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 0 SYSTEM *** /u01/app/oracle/oradata/orcl/system01.dbf
2 0 SYSAUX *** /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 0 UNDOTBS1 *** /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 0 USERS *** /u01/app/oracle/oradata/orcl/users01.dbf
5 0 EXAMPLE *** /u01/app/oracle/oradata/orcl/example01.dbf
6 100 TEST *** /u01/app/datafile/test01.dbf
7 0 HH *** /u01/app/oracle/oradata/orcl/hh01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 0 TEMP 32767 /u01/app/oracle/oradata/orcl/temp01.dbf
RMAN> run{
2> set newname for datafile 1 to '/datafile/system01.dbf';
3> set newname for datafile 2 to '/datafile/sysaux01.dbf';
4> set newname for datafile 3 to '/datafile/undotbs01.dbf';
5> set newname for datafile 4 to '/datafile/users01.dbf';
6> set newname for datafile 5 to '/datafile/example01.dbf';
7> set newname for datafile 7 to '/datafile/hh01.dbf';
8> restore database;
9> switch datafile all;
10> recover database;
11> }
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 26-AUG-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 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 00003 to /datafile/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /datafile/example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /u01/app/datafile/test01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_1epgsem7_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_1epgsem7_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
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 00001 to /datafile/system01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_1cpgsem7_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_1cpgsem7_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
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 00002 to /datafile/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /datafile/users01.dbf
channel ORA_DISK_1: restoring datafile 00007 to /datafile/hh01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_1dpgsem7_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_1dpgsem7_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:26
Finished restore at 26-AUG-14
datafile 1 switched to datafile copy
input datafile copy RECID=22 STAMP=856571612 file name=/datafile/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=23 STAMP=856571612 file name=/datafile/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=24 STAMP=856571612 file name=/datafile/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=25 STAMP=856571612 file name=/datafile/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=26 STAMP=856571612 file name=/datafile/example01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=27 STAMP=856571612 file name=/datafile/hh01.dbf
Starting recover at 26-AUG-14
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:02
Finished recover at 26-AUG-14
開啟資料庫:
SQL> alter database open;
Database altered.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29800581/viewspace-1258053/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN恢復案例:無恢復目錄,丟失全部資料檔案、控制檔案、日誌檔案恢復
- 資料檔案丟失的恢復
- 資料檔案丟失如何恢復
- RMAN恢復案例:丟失全部資料檔案恢復
- RMAN完全恢復丟失的資料檔案
- 普通資料檔案丟失的恢復方法
- 資料檔案丟失損壞的恢復--
- 電腦檔案丟失資料恢復資料恢復
- Oracle備份與恢復【丟失資料檔案的恢復】Oracle
- 歸檔模式下資料檔案丟失的恢復模式
- 恢復案例:歸檔模式下丟失全部資料檔案的恢復模式
- 備份恢復之資料檔案丟失
- RMAN恢復案例:丟失非系統資料檔案恢復
- 恢復丟失的控制檔案
- rman恢復--歸檔模式有備份,丟失資料檔案的恢復模式
- rman恢復--歸檔模式無備份,丟失資料檔案的恢復模式
- 控制檔案丟失恢復
- 【控制檔案丟失恢復】
- rman 恢復---歸檔丟失and資料檔案損壞
- 引數檔案控制檔案和資料檔案丟失的恢復
- Sql Server資料庫檔案丟失的恢復方法SQLServer資料庫
- 撤消表空間資料檔案丟失的恢復.
- oracle實驗記錄(恢復-丟失未備份資料檔案)Oracle
- 完全恢復之所有資料庫檔案丟失資料庫
- 資料庫各種檔案丟失恢復大全。資料庫
- 【恢復】Redo日誌檔案丟失的恢復
- 歸檔模式下丟失普通資料檔案並恢復模式
- 控制檔案全部丟失的恢復
- 控制檔案部分丟失的恢復
- Oracle Password檔案丟失的恢復Oracle
- 控制檔案丟失的RMAN恢復
- 【資料庫資料恢復】Sql Server資料庫檔案丟失的資料恢復過程資料庫資料恢復SQLServer
- 【伺服器資料恢復】xfs檔案系統資料丟失的資料恢復案例伺服器資料恢復
- 【北亞資料恢復】MongoDB資料遷移檔案丟失的MongoDB資料恢復案例資料恢復MongoDB
- DATA GUARD主庫丟失資料檔案的恢復(2)
- DATA GUARD主庫丟失資料檔案的恢復(3)
- DATA GUARD主庫丟失資料檔案的恢復(1)
- 磁碟損壞導致資料檔案丟失的恢復