eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« Oracle数据恢复:SYSTEM表空间的重要性 | Blog首页 | Oracle数据恢复:AMDU恢复ASM磁盘组数据 »

Oracle数据恢复:异常中断的操作都很危险

最近遇到的一则案例,由于一个失败的操作,导致了数据库崩溃和不可启动,最后的处理过程非常复杂。

但是我想说的是,对于一个DBA需要学习去避免问题而不是陷入问题之中,以下一个简单的测试就可以重现类似的问题。
DBA应当存在一种基本的常识,那就是:每一个异常中断的操作都可能极为危险,我们应当尽量避免,思虑周全是对于DBA的基本要求。

以下对于LOB对象的一个操作,从前台就导致了一个600的内部错误,这实际上是因为空间不足触发了一个BUG:
SQL> connect eygle/eygle
Connected.
SQL> CREATE TABLE FLOBS
  2  (
  3  FILE_ID NUMBER NOT NULL,
  4  FILE_NAME VARCHAR2(256 BYTE),
  5  FILE_CONTENT_TYPE VARCHAR2(256 BYTE) NOT NULL,
  6  FILE_DATA BLOB,
  7  UPLOAD_DATE DATE,
  8  EXPIRATION_DATE DATE
  9  );

Table created.

SQL>
SQL> ALTER TABLE flobs MODIFY LOB (file_data) (allocate extent (size 8000m));
ALTER TABLE flobs MODIFY LOB (file_data) (allocate extent (size 8000m))
*
ERROR at line 1:
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kddummy_blkchk], [4], [395],
[18038], [], [], [], []

在告警日志中可以看到进一步的信息:
Sat Mar  3 14:41:14 2012
Errors in file /home/xxx/db/admin/ora1020410/udump/ora1020410_ora_12803.trc:
ORA-00600: internal error code, arguments: [kddummy_blkchk], [4], [395], [18038], [], [], [], []
Sat Mar  3 14:41:16 2012
Doing block recovery for file 2 block 1096
Block recovery from logseq 12, block 39723 to scn 927026
Sat Mar  3 14:41:16 2012
Recovery of Online Redo Log: Thread 1 Group 3 Seq 12 Reading mem 0
  Mem# 0: /home/xxx/db/oradata/ORA1020410/onlinelog/o1_mf_3_7noo6xgy_.log
  Mem# 1: /home/xxx/db/flash_recovery_area/ORA1020410/onlinelog/o1_mf_3_7noo6y7y_.log
Block recovery completed at rba 12.39829.16, scn 0.927027
Doing block recovery for file 4 block 395
Block recovery from logseq 12, block 39498 to scn 927026
Sat Mar  3 14:41:16 2012
Recovery of Online Redo Log: Thread 1 Group 3 Seq 12 Reading mem 0
  Mem# 0: /home/xxx/db/oradata/ORA1020410/onlinelog/o1_mf_3_7noo6xgy_.log
  Mem# 1: /home/xxx/db/flash_recovery_area/ORA1020410/onlinelog/o1_mf_3_7noo6y7y_.log
Block recovery completed at rba 12.39829.16, scn 0.927027
Sat Mar  3 14:41:16 2012
Corrupt Block Found
         TSN = 4, TSNAME = USERS
         RFN = 4, BLK = 395, RDBA = 16777611
         OBJN = 53671, OBJD = 53671, OBJECT = SYS_LOB0000053670C00004$$, SUBOBJECT =
         SEGMENT OWNER = EYGLE, SEGMENT TYPE = Lob Segment

这个数据库的版本是:
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0    Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

作为警示,记录于此。


历史上的今天...
    >> 2009-03-05文章:
    >> 2006-03-05文章:

无觅

By eygle on 2012-03-05 08:37 | Comments (0) | Backup&Recovery | 2961 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com