回滾段表空間資料檔案損壞解決方法
症狀:回滾表空間資料檔案顯示離線,需要恢復,資料檔案已經損壞,但回滾表空間聯機正常,發出命令使資料檔案聯機時,出現以下錯誤
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '/orasys/oracle/oradata/orasvr2/undotbs01.dbf'
檢視系統回滾段的情況
SELECT segment_name,tablespace_name,owner,status FROM dba_rollback_segs;
結果: _SYSSMU1$ 到 _SYSSMU10$ 的狀態都是 "NEED RECOVERY"
解決過程:
-bash-2.05b$ sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Aug 1 15:41:28 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
-bash-2.05b$ ls
control01.ctl indx01.dbf temp01.dbf users01.dbf
drsys01.dbf redo01.log tools01.dbf xdb01.dbf
example01.dbf system01.dbf undotbS01.dbf
-bash-2.05b$ mv undotbs01.dbf undotbs01.dbf.xxx
-bash-2.05b$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Aug 1 15:41:28 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 143725064 bytes
Fixed Size 451080 bytes
Variable Size 109051904 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: '/orasys/oracle/oradata/orasvr2/undotbs01.dbf'
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 10800
undo_suppress_errors boolean FALSE
undo_tablespace string UNDOTBS1
SQL> alter system set undo_management = manual scope=spfile;
System altered.
SQL> shutdown
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
-bash-2.05b$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Aug 1 15:41:28 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect / as sysdba;
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 143725064 bytes
Fixed Size 451080 bytes
Variable Size 109051904 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2:
SQL> alter database datafile
'/orasys/oracle/oradata/orasvr2/undotbs01.dbf' offline drop;
Database altered.
SQL> alter database open;
Database altered.
SQL> drop tablespace undotbs1;
ORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping tablespace
發現有活動的事物還在undo表空間,不能刪除undo表空間
SQL> create pfile from spfile;
File created
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
編輯initorasvr2.ORA 引數
*.undo_management='AUTO'
*.undo_retention=10800
*.undo_tablespace='UNDOTBS1'
_corrupted_rollback_segments=(_SYSSMU1$,_SYSSMU2$,_SYSSMU3$,_SYSSMU4$,_SYSSMU5$,_SYSSMU6$,_SYSSMU7$,_SYSSMU8$,_SYSSMU9$,_SYSSMU10$)
SQL>create spfile from pfile;
File Created
SQL>startup;
ORACLE instance started
Total System Global Area 101784276 bytes
Fixed Size 453332 bytes
Variable Size 75497472 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Alter database mount
Alter database open
SQL> drop tablespace undotbs1;
Tablespace dropped.
SQL> create UNDO tablespace undotbs1
datafile '/orasys/oracle/oradata/orasvr2/undotbs01.dbf' size
250m autoextend on next 1m maxsize 1024m;
Tablespace created.
SQL> alter system set undo_management = auto scope=spfile;
System altered.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
把加入的這段引數去掉:_corrupted_rollback_segments=(_SYSSMU1$,_SYSSMU2$,_SYSSMU3$,_SYSSMU4$,_SYSSMU5$,_SYSSMU6$,_SYSSMU7$,_SYSSMU8$,_SYSSMU9$,_SYSSMU10$)
重新啟動資料庫後即可
SQL> select segment_name,status from dba_rollback_segs;
SEGMENT_NAME STATUS
------------------------------ ----------------
SYSTEM ONLINE
_SYSSMU1$ ONLINE
_SYSSMU2$ ONLINE
_SYSSMU3$ ONLINE
_SYSSMU4$ ONLINE
_SYSSMU5$ ONLINE
_SYSSMU6$ ONLINE
_SYSSMU7$ ONLINE
_SYSSMU8$ ONLINE
_SYSSMU9$ ONLINE
_SYSSMU10$ ONLINE
11 rows selected
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-600/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL 磁碟空間滿導致表空間相關資料檔案損壞故障處理MySql
- oracle 普通表空間資料檔案壞塊Oracle
- PostgreSQL資料庫toast表損壞解決SQL資料庫AST
- Oracle單個資料檔案損壞,在Rman命令裡設定表空間、資料檔案offline方式來恢復最方便Oracle
- Oracle 控制檔案損壞解決方案Oracle
- InterBase資料庫檔案損壞的修復方法資料庫
- u盤檔案損壞怎麼恢復資料 u盤恢復損壞資料的有效方法
- 臨時表空間和回滾表空間使用率查詢
- 表空間和資料檔案的管理
- Oracle臨時表空間檢視、新增臨時表空間資料檔案、修改預設臨時表空間 方法!Oracle
- system資料檔案頭損壞修復
- 表空間(資料檔案shrink)收縮示例
- win10不管解壓什麼都損壞怎麼辦 win10檔案損壞無法解壓解決方法Win10
- 新建的表空間(或資料檔案)丟失以及控制檔案丟失,有新建表空間(或資料檔案)前的控制文
- 實踐資料回滾解決方案
- MySQL InnoDB系統表空間資料檔案配置MySql
- 2.5.9 在資料庫建立期間支援大檔案表空間資料庫
- 2.5.4 為 SYSAUX 表空間指定資料檔案屬性UX
- PostgreSQL在不同的表空間移動資料檔案SQL
- 表空間與資料檔案的offline和online操作
- Oracle 表空間增加檔案Oracle
- ipa包用企業籤做簽名後提示描述檔案損壞解決方法
- Oracle案例11——Oracle表空間資料庫檔案收縮Oracle資料庫
- windows10系統開啟Ableton Live檔案出現已損壞的解決方法Windows
- win10系統登入後提示qqlive.exe 損壞檔案的解決方法Win10
- 控制檔案損壞處理
- u盤檔案損壞怎麼恢復資料 u盤損壞無法讀取怎麼恢復資料
- 資料庫回檔解決方案資料庫
- 關於丟失表空間資料檔案的處理方式
- 達夢資料庫系統表空間資料檔案遷移過程資料庫
- oracle dg庫資料檔案空間不足Oracle
- [20140516]取出回滾段資訊.txt
- 圖解gzip壓縮檔案底層結構及檔案損壞的修復方法圖解
- 【資料庫資料恢復】MongoDB資料庫檔案損壞的資料恢復案例資料庫資料恢復MongoDB
- PostgreSQL DBA(30) - Backup&Recovery#3(資料檔案損壞恢復)SQL
- MongoDB 資料檔案損壞修復救命repair與致命危險MongoDBAI
- MySQL 系統表空間檔案解析MySql
- 解決Reiserfs檔案系統損壞的問題我們是認真的
- 織夢資料庫配置檔案資料庫損壞:嘗試修復資料庫資料庫