Oracle 11g 資料庫恢復-場景7:部分檔案損壞
場景7:部分檔案損壞(系統預設undo表空間資料檔案)恢復,OPEN狀態
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ undo_tablespace string UNDOTBS1
sys@TESTDB11>select tablespace_name, contents from dba_tablespaces;
TABLESPACE_NAME CONTENTS ------------------------------ --------- SYSTEM PERMANENT SYSAUX PERMANENT UNDOTBS1 UNDO TEMP TEMPORARY USERS PERMANENT EXAMPLE PERMANENT ROTBS PERMANENT
7 rows selected.
--刪除資料檔案 sys@TESTDB11>!rm /u01/app/oracle/oradata/TestDB11/undotbs01.dbf
--確定undo表示空間資料檔案編號,為3號檔案 sys@TESTDB11>select file#, name from v$datafile;
FILE# NAME ---------- -------------------------------------------------- 1 /u01/app/oracle/oradata/TestDB11/system01.dbf 2 /u01/app/oracle/oradata/TestDB11/sysaux01.dbf 3 /u01/app/oracle/oradata/TestDB11/undotbs01.dbf 4 /u01/app/oracle/oradata/TestDB11/users01.dbf 5 /u01/app/oracle/oradata/TestDB11/example01.dbf 6 /u01/app/oracle/oradata/TestDB11/rotbs01.dbf
6 rows selected.
--不可以使undo表空間離線 sys@TESTDB11>alter database datafile 3 offline; alter database datafile 3 offline * ERROR at line 1: ORA-00603: ORACLE server session terminated by fatal error ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: '/u01/app/oracle/oradata/TestDB11/undotbs01.dbf' ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: '/u01/app/oracle/oradata/TestDB11/undotbs01.dbf' ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: '/u01/app/oracle/oradata/TestDB11/undotbs01.dbf' Process ID: 8003 Session ID: 1 Serial number: 5
--嘗試建立新的undo表空間,也不可以 sys@TESTDB11>create tablespace undotbs2 datafile '/u01/app/oracle/oradata/TestDB11/undotbs201.dbf' size 200m; ERROR: ORA-03114: not connected to ORACLE
sys@TESTDB11>conn / as sysdba Connected. sys@TESTDB11>create tablespace undotbs2 datafile '/u01/app/oracle/oradata/TestDB11/undotbs201.dbf' size 200m; create tablespace undotbs2 datafile '/u01/app/oracle/oradata/TestDB11/undotbs201.dbf' size 200m * ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: '/u01/app/oracle/oradata/TestDB11/undotbs01.dbf'
-- 關庫,重新啟動到MOUNT狀態 sys@TESTDB11>startup mount force; ORACLE instance started.
Total System Global Area 855982080 bytes Fixed Size 2230792 bytes Variable Size 641730040 bytes Database Buffers 209715200 bytes Redo Buffers 2306048 bytes Database mounted. --還原 sys@TESTDB11>!cp /backup/inconsistent_backup/undotbs01.dbf /u01/app/oracle/oradata/TestDB11 --恢復 sys@TESTDB11>recover datafile 3; ORA-00279: change 2654893 generated at 08/09/2013 21:27:06 needed for thread 1 ORA-00289: suggestion : /archive2/1_98_813665348.dbf ORA-00280: change 2654893 for thread 1 is in sequence #98
Specify log: {<RET>=suggested | filename | AUTO | CANCEL} auto ORA-00279: change 2660981 generated at 08/09/2013 22:19:48 needed for thread 1 ORA-00289: suggestion : /archive2/1_99_813665348.dbf ORA-00280: change 2660981 for thread 1 is in sequence #99
ORA-00279: change 2667783 generated at 08/10/2013 00:00:55 needed for thread 1 ORA-00289: suggestion : /archive2/1_100_813665348.dbf ORA-00280: change 2667783 for thread 1 is in sequence #100
ORA-00279: change 2679804 generated at 08/10/2013 03:00:28 needed for thread 1 ORA-00289: suggestion : /archive2/1_101_813665348.dbf ORA-00280: change 2679804 for thread 1 is in sequence #101
ORA-00279: change 2699110 generated at 08/10/2013 08:29:58 needed for thread 1 ORA-00289: suggestion : /archive2/1_102_813665348.dbf ORA-00280: change 2699110 for thread 1 is in sequence #102
ORA-00279: change 2725650 generated at 08/10/2013 10:27:18 needed for thread 1 ORA-00289: suggestion : /archive2/1_103_813665348.dbf ORA-00280: change 2725650 for thread 1 is in sequence #103
ORA-00279: change 2726122 generated at 08/10/2013 10:29:03 needed for thread 1 ORA-00289: suggestion : /archive2/1_104_813665348.dbf ORA-00280: change 2726122 for thread 1 is in sequence #104
ORA-00279: change 2726220 generated at 08/10/2013 10:32:28 needed for thread 1 ORA-00289: suggestion : /archive2/1_105_813665348.dbf ORA-00280: change 2726220 for thread 1 is in sequence #105
Log applied. Media recovery complete. --開庫 sys@TESTDB11>alter database open;
Database altered.
--但此時undo表空間顯示為離線(因為剛才做了一下離線操作) sys@TESTDB11>select name, status from v$datafile;
NAME STATUS -------------------------------------------------- ------- /u01/app/oracle/oradata/TestDB11/system01.dbf SYSTEM /u01/app/oracle/oradata/TestDB11/sysaux01.dbf ONLINE /u01/app/oracle/oradata/TestDB11/undotbs01.dbf OFFLINE /u01/app/oracle/oradata/TestDB11/users01.dbf ONLINE /u01/app/oracle/oradata/TestDB11/example01.dbf ONLINE /u01/app/oracle/oradata/TestDB11/rotbs01.dbf ONLINE
6 rows selected.
--使其聯機 sys@TESTDB11>alter database datafile 3 online;
Database altered. |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17013648/viewspace-1151913/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【資料庫資料恢復】MongoDB資料庫檔案損壞的資料恢復案例資料庫資料恢復MongoDB
- u盤檔案損壞怎麼恢復資料 u盤恢復損壞資料的有效方法
- 【資料庫資料恢復】Oracle資料庫檔案出現壞塊報錯的資料恢復案例資料庫資料恢復Oracle
- Oracle資料庫不同損壞級別的恢復詳解Oracle資料庫
- u盤檔案損壞怎麼恢復資料 u盤損壞無法讀取怎麼恢復資料
- InterBase資料庫檔案損壞的修復方法資料庫
- 學習這篇Oracle資料庫檔案壞塊損壞的恢復方法,擴充你的知識面Oracle資料庫
- 資料庫資料恢復—NTFS分割槽損壞如何恢復SqlServer資料庫資料資料庫資料恢復SQLServer
- 【伺服器資料恢復】IBM儲存伺服器硬碟壞道離線、oracle資料庫損壞的資料恢復伺服器資料恢復IBM硬碟Oracle資料庫
- PostgreSQL DBA(30) - Backup&Recovery#3(資料檔案損壞恢復)SQL
- 伺服器Oracle資料庫損壞修復伺服器Oracle資料庫
- 【儲存資料恢復】IBM儲存檔案NTFS系統損壞的資料恢復案例資料恢復IBM
- 【伺服器資料恢復】某品牌ProLiant伺服器raid癱瘓資料庫檔案損壞的資料恢復伺服器資料恢復AI資料庫
- SQL Anywhere db檔案損壞修復 DB檔案修復 DB資料庫修復SQL資料庫
- system資料檔案頭損壞修復
- 資料庫資料恢復-SQL SERVER資料庫MDF (NDF)或LDF損壞如何恢復資料?資料庫資料恢復SQLServer
- 織夢資料庫配置檔案資料庫損壞:嘗試修復資料庫資料庫
- 【伺服器資料恢復】伺服器reiserfs檔案系統損壞的資料恢復案例伺服器資料恢復
- 【LINUX】Oracle資料庫 linux磁碟頭資料損壞修復LinuxOracle資料庫
- oracle控制檔案的損壞或完全丟失的恢復辦法Oracle
- Oracle asm磁碟損壞異常恢復OracleASM
- PostgreSQL 恢復大法 - 恢復部分資料庫、跳過壞塊、修復無法啟動的資料庫SQL資料庫
- 資料底層損壞的恢復方法—拼碎片恢復資料
- Oracle單個資料檔案損壞,在Rman命令裡設定表空間、資料檔案offline方式來恢復最方便Oracle
- 【北亞伺服器資料恢復】伺服器reiserfs檔案系統損壞的資料恢復案例伺服器資料恢復
- 執行在容器中Postgres資料庫資料損壞後如何恢復?資料庫
- oracle資料庫損壞的恢復過程-基於IBM伺服器儲存Oracle資料庫IBM伺服器
- 【北亞資料恢復】伺服器raid陣列癱瘓導致ZFS檔案系統元檔案損壞的資料恢復資料恢復伺服器AI陣列
- 資料恢復記錄:硬碟分割槽損壞修復SqlServer資料庫過程資料恢復硬碟SQLServer資料庫
- 【資料庫資料恢復】透過恢復NDF檔案修復資料庫的資料恢復過程資料庫資料恢復
- 隨身碟顆粒損壞資料恢復資料恢復
- 伺服器資料恢復-ext3檔案系統下oracle資料庫資料恢復案例伺服器資料恢復Oracle資料庫
- 【北亞資料恢復】誤操作分割槽損壞導致SqlServer資料庫資料丟失的資料恢復資料恢復SQLServer資料庫
- 【RMAN】如果控制檔案損壞那麼如何恢復?恢復控制檔案的方式有哪幾種?
- SQLite資料庫損壞及其修復探究SQLite資料庫
- 【資料庫資料恢復】SQL SERVER資料庫MDF (NDF)或LDF損壞問題如何解決?資料庫資料恢復SQLServer
- Oracle 控制檔案損壞解決方案Oracle
- 【伺服器資料恢復】raid5崩潰導致lvm資訊和VXFS檔案系統損壞的資料恢復案例伺服器資料恢復AILVM
- 【資料庫資料恢復】如何恢復Oracle資料庫truncate表的資料資料庫資料恢復Oracle