資料檔案丟失---ora-01110
SQL> startup
ORACLE instance started.
Total System Global Area 580395008 bytes
Fixed Size 2255392 bytes
Variable Size 427820512 bytes
Database Buffers 146800640 bytes
Redo Buffers 3518464 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/u01/app/oracle/oradata/ANDREA/test.dbf'
資料恢復的步驟包括:restore 和recover兩個主要過程。
restore 需要透過已有的備份對丟失的檔案進行重建,recover透過應用online redo log archived redo log undo data使丟失的資料檔案恢復到一定的狀態。
先檢視資料庫目前的狀態:
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
---------- ------- ------- ----------------------------------------------------------------- ---------- ---------
6 ONLINE ONLINE FILE NOT FOUND 0
資料庫處於mount狀態,資料檔案6已丟失且沒有備份檔案,先使用下面的命令來"restore"丟失的檔案
SQL> alter database create datafile '/u01/app/oracle/oradata/ANDREA/test.dbf';
然後就可進行recover了。
sql> recover datafile 6;
SQL> alter database open;
Database altered.
-------------------------------------------------
Use the CREATE DATAFILE clause to create a new empty data file in place of an old one. You can use this clause to re-create a data file that was lost with no backup. The filename or filenumber must identify a file that is or was once part of the database. If you identify the file by number, then filenumber is an integer representing the number found in the FILE# column of the V$DATAFILE dynamic performance view or in the FILE_ID column of the DBA_DATA_FILES data dictionary view.
-
Specify AS NEW to create an Oracle-managed data file with a system-generated filename, the same size as the file being replaced, in the default file system location for data files.
-
Specify AS file_specification to assign a file name (and optional size) to the new data file. Use the datafile_tempfile_spec form of file_specification (see ) to list regular data files and temp files in an operating system file system or to list Oracle Automatic Storage Management (Oracle ASM) disk group files.
If the original file (filename or filenumber) is an existing Oracle-managed data file, then Oracle Database attempts to delete the original file after creating the new file. If the original file is an existing user-managed data file, then Oracle Database does not attempt to delete the original file.
If you omit the AS clause entirely, then Oracle Database creates the new file with the same name and size as the file specified by filename or filenumber.
During recovery, all archived redo logs written to since the original data file was created must be applied to the new, empty version of the lost data file.
Oracle Database creates the new file in the same state as the old file when it was created. You must perform media recovery on the new file to return it to the state of the old file at the time it was lost.
Restrictions on Creating New Data Files The creation of new data files is subject to the following restrictions:
-
You cannot create a new file based on the first data file of the SYSTEM tablespace.
-
You cannot specify the autoextend_clause of datafile_tempfile_spec in this CREATE DATAFILE clause.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21754115/viewspace-1063617/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資料檔案損壞、丟失
- 模擬資料檔案丟失
- 資料檔案丟失的恢復
- dfm檔案資料丟失問題
- 資料檔案丟失如何恢復
- rman恢復:資料檔案丟失,控制檔案丟失,聯機日誌檔案丟失(非當前使用與當前使用)
- 電腦檔案丟失資料恢復資料恢復
- RMAN完全恢復丟失的資料檔案
- 普通資料檔案丟失的恢復方法
- 資料檔案丟失損壞的恢復--
- 備份恢復之資料檔案丟失
- dataguard之物理備庫丟失資料檔案
- rman 恢復---歸檔丟失and資料檔案損壞
- 歸檔模式下資料檔案丟失的恢復模式
- 引數檔案控制檔案和資料檔案丟失的恢復
- 新建的表空間(或資料檔案)丟失以及控制檔案丟失,有新建表空間(或資料檔案)前的控制文
- 完全恢復之所有資料庫檔案丟失資料庫
- 磁碟損壞,system及部分資料檔案丟失
- 資料庫各種檔案丟失恢復大全。資料庫
- [求助]exp時丟失了一個資料檔案?
- 歸檔模式下丟失普通資料檔案並恢復模式
- 找回丟失的檔案
- dds丟失字典檔案
- 檔案傳輸軟體如何有效防止資料丟失?
- Sql Server資料庫檔案丟失的恢復方法SQLServer資料庫
- 丟失一個控制檔案並恢復資料庫資料庫
- 資料檔案丟失的恢復(改變目錄)
- 撤消表空間資料檔案丟失的恢復.
- RMAN恢復案例:丟失全部資料檔案恢復
- 丟失已歸檔日誌檔案下恢復資料庫資料庫
- 歸檔模式無備份丟失資料檔案後恢復模式
- 歸檔模式有備份丟失資料檔案後恢復模式
- 無備份丟失部分資料檔案和控制檔案恢復 [轉]
- 資料庫啟動時丟失資料檔案模擬實驗資料庫
- . 資料庫臨時表空間的資料檔案的丟失資料庫
- MongoDB資料庫報錯,資料庫檔案丟失資料恢復案例MongoDB資料庫資料恢復
- 隨身碟檔案丟失怎麼辦 隨身碟資料丟失快速恢復方法
- DATA GUARD主庫丟失資料檔案的恢復(2)