Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

1

好友

1

主题
1#
发表于 2013-2-28 04:10:20 | 查看: 5178| 回复: 7
本帖最后由 oracle321 于 2013-2-28 11:29 编辑

查询dba_data_files出现下面报错:
  1. SQL> select count(*) from dba_data_files;
  2. select count(*) from dba_data_files
  3. *
  4. ERROR at line 1:
  5. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
复制代码
逐一查询dba_data_files视图相关表,定位x$ktfbhc查询时异常:
  1. SQL> select count(*) from x$ktfbhc;
  2. select count(*) from x$ktfbhc
  3. *
  4. ERROR at line 1:
  5. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
复制代码
其它故障现象:
1. 当sys用户创建表时,也会出现该问题:
  1. SQL> create table iii as select * from dba_objects;
  2. create table iii as select * from dba_objects
  3.                                   *
  4. ERROR at line 1:
  5. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [],
  6. [], []
复制代码
如果在表放在其它表空间则正常:

  1. SQL>  create table iii tablespace users as select * from dba_objects;
  2. Table created.
复制代码
2. system表空间有临时段未清除

  1. SQL>  select * from dba_segments where segment_type='TEMPORARY';

  2. OWNER                          SEGMENT_NAME                                                                      PARTITION_NAME                 SEGMENT_TYPE       TABLESPACE_NAME
  3. ------------------------------ --------------------------------------------------------------------------------- ------------------------------ ------------------ ------------------------------
  4. HEADER_FILE HEADER_BLOCK      BYTES     BLOCKS    EXTENTS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS FREELIST_GROUPS RELATIVE_FNO BUFFER_
  5. ----------- ------------ ---------- ---------- ---------- -------------- ----------- ----------- ----------- ------------ ---------- --------------- ------------ -------
  6. SYS                            1.29873                                                                                                          TEMPORARY          SYSTEM
  7.           1        29873    1048576        128         16          65536                       1  2147483645                       1               1            1 DEFAULT
复制代码
已尝试操作:
1. 禁用smon的临时段清理功能,故障仍然存在

  1. NAME TYPE VALUE

  2. --------------------------------------------------------------------------------
  3. -----------
  4. --------------------------------------------------------------------------------
  5. event string 10061 trace name context forever, level 10
复制代码
2. 手工删除临时段
alter session set events ‘immediate trace name DROP_SEGMENTS level 1′;
命令执行正常,但后台仍有600报错

3.重启数据后,该临时段仍然存在。

4. 试图运行hcheck脚本,但hcheck3.sql脚本执行中途退出,检查alert日志,同样出现600

ORA-600 ktfbhget-4错误是否与临时段无法清除有关?
system表空间的临时段是否能手工删除?
谢谢大家!


补充:
1.  数据库版本:
10.2.0.4    测试环境

2. 告警日志信息

  1. ......
  2. Sun May  1 22:09:08 2011
  3. Completed: ALTER DATABASE OPEN
  4. Sun May  1 22:15:23 2011
  5. Errors in file /home/oracle/admin/davidloc/bdump/davidloc_smon_4622.trc:
  6. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  7. Sun May  1 22:15:24 2011
  8. Non-fatal internal error happenned while SMON was doing logging scn->time mapping.
  9. SMON encountered 1 out of maximum 100 non-fatal internal errors.
  10. Sun May  1 22:16:13 2011
  11. Errors in file /home/oracle/admin/davidloc/udump/davidloc_ora_4677.trc:
  12. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  13. Sun May  1 22:16:15 2011
  14. Errors in file /home/oracle/admin/davidloc/udump/davidloc_ora_4677.trc:
  15. ORA-00603: ORACLE server session terminated by fatal error
  16. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  17. Sun May  1 22:17:52 2011
  18. Errors in file /home/oracle/admin/davidloc/udump/davidloc_ora_4718.trc:
  19. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  20. Sun May  1 22:17:52 2011
  21. Errors in file /home/oracle/admin/davidloc/udump/davidloc_ora_4718.trc:
  22. ORA-00603: ORACLE server session terminated by fatal error
  23. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  24. Sun May  1 22:18:48 2011
  25. Errors in file /home/oracle/admin/davidloc/udump/davidloc_ora_4778.trc:
  26. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  27. Sun May  1 22:18:48 2011
  28. Errors in file /home/oracle/admin/davidloc/udump/davidloc_ora_4778.trc:
  29. ORA-00603: ORACLE server session terminated by fatal error
  30. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  31. Sun May  1 22:21:17 2011
  32. Errors in file /home/oracle/admin/davidloc/udump/davidloc_ora_4813.trc:
  33. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  34. Sun May  1 22:21:18 2011
  35. Errors in file /home/oracle/admin/davidloc/udump/davidloc_ora_4813.trc:
  36. ORA-00603: ORACLE server session terminated by fatal error
  37. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  38. Sun May  1 22:21:33 2011
  39. Errors in file /home/oracle/admin/davidloc/bdump/davidloc_smon_4622.trc:
  40. ORA-00600: internal error code, arguments: [ktfbhget-4], [0], [5], [], [], [], [], []
  41. Sun May  1 22:21:33 2011
  42. Non-fatal internal error happenned while SMON was doing logging scn->time mapping.
  43. SMON encountered 2 out of maximum 100 non-fatal internal errors.
复制代码
测试环境的主机时间没做调整。

第一次发贴,谢谢刘大提醒。

davidloc_ora_4677.rar

963.91 KB, 下载次数: 1061

trace文件

2#
发表于 2013-2-28 09:42:05
至少数据库版本写一下吧?

回复 只看该作者 道具 举报

3#
发表于 2013-2-28 10:44:34
/home/oracle/admin/davidloc/bdump/davidloc_smon_4622.trc
/home/oracle/admin/davidloc/udump/davidloc_ora_4677.trc

上传看一下

回复 只看该作者 道具 举报

4#
发表于 2013-2-28 11:30:49
已经补充trc文件
冒似写东西到system表空间均会报错。。。。

回复 只看该作者 道具 举报

5#
发表于 2013-2-28 13:30:16
dbv file=system.dbf
  1. 1) $ rman target / nocatalog

  2. 2) RMAN> run {
  3. allocate channel d1 type disk;
  4. allocate channel d2 type disk;
  5. allocate channel d3 type disk;
  6. allocate channel d4 type disk;
  7. backup validate check logical database;
  8. }

  9. 3) select * from V$DATABASE_BLOCK_CORRUPTION ;

  10. REM www.oracledatabase12g.com & www.askmaclean.com

  11. 4) If V$DATABASE_BLOCK_CORRUPTION contains rows please run this query to
  12. find the objects that contains the corrupted blocks:


  13. SELECT e.owner,
  14.        e.segment_type,
  15.        e.segment_name,
  16.        e.partition_name,
  17.        c.file#,
  18.        greatest(e.block_id, c.block#) corr_start_block#,
  19.        least(e.block_id + e.blocks - 1, c.block# + c.blocks - 1) corr_end_block#,
  20.        least(e.block_id + e.blocks - 1, c.block# + c.blocks - 1) -
  21.        greatest(e.block_id, c.block#) + 1 blocks_corrupted,
  22.        null description
  23.   FROM dba_extents e, v$database_block_corruption c
  24. WHERE e.file_id = c.file#
  25.    AND e.block_id <= c.block# + c.blocks - 1
  26.    AND e.block_id + e.blocks - 1 >= c.block#
  27. UNION
  28. SELECT s.owner,
  29.        s.segment_type,
  30.        s.segment_name,
  31.        s.partition_name,
  32.        c.file#,
  33.        header_block corr_start_block#,
  34.        header_block corr_end_block#,
  35.        1 blocks_corrupted,
  36.        'Segment Header' description
  37.   FROM dba_segments s, v$database_block_corruption c
  38. WHERE s.header_file = c.file#
  39.    AND s.header_block between c.block# and c.block# + c.blocks - 1
  40. UNION
  41. SELECT null owner,
  42.        null segment_type,
  43.        null segment_name,
  44.        null partition_name,
  45.        c.file#,
  46.        greatest(f.block_id, c.block#) corr_start_block#,
  47.        least(f.block_id + f.blocks - 1, c.block# + c.blocks - 1) corr_end_block#,
  48.        least(f.block_id + f.blocks - 1, c.block# + c.blocks - 1) -
  49.        greatest(f.block_id, c.block#) + 1 blocks_corrupted,
  50.        'Free Block' description
  51.   FROM dba_free_space f, v$database_block_corruption c
  52. WHERE f.file_id = c.file#
  53.    AND f.block_id <= c.block# + c.blocks - 1
  54.    AND f.block_id + f.blocks - 1 >= c.block#
  55. order by file#, corr_start_block#;


  56. SELECT tablespace_name, segment_type, owner, segment_name
  57. FROM dba_extents
  58. WHERE file_id = &fileid
  59. and &blockid between block_id AND block_id + blocks - 1;
复制代码

回复 只看该作者 道具 举报

6#
发表于 2013-2-28 16:17:55
刘大,按你的步骤逐一执行,收集输出如下:

1. dbv检查结果

  1. [oracle@win0105rac1 ~]$ dbv file=/oradata/davidloc/davidloc/system01.dbf

  2. DBVERIFY: Release 10.2.0.4.0 - Production on Mon May 2 04:14:29 2011

  3. Copyright (c) 1982, 2007, Oracle.  All rights reserved.

  4. DBVERIFY - Verification starting : FILE = /oradata/davidloc/davidloc/system01.dbf


  5. DBVERIFY - Verification complete

  6. Total Pages Examined         : 38400
  7. Total Pages Processed (Data) : 11706
  8. Total Pages Failing   (Data) : 0
  9. Total Pages Processed (Index): 3348
  10. Total Pages Failing   (Index): 0
  11. Total Pages Processed (Other): 1784
  12. Total Pages Processed (Seg)  : 0
  13. Total Pages Failing   (Seg)  : 0
  14. Total Pages Empty            : 21562
  15. Total Pages Marked Corrupt   : 0
  16. Total Pages Influx           : 0
  17. Highest block SCN            : 452340 (0.452340)
  18. [oracle@win0105rac1 ~]$ dbv file=/oradata/davidloc/davidloc/system02.dbf

  19. DBVERIFY: Release 10.2.0.4.0 - Production on Mon May 2 04:14:48 2011

  20. Copyright (c) 1982, 2007, Oracle.  All rights reserved.

  21. DBVERIFY - Verification starting : FILE = /oradata/davidloc/davidloc/system02.dbf


  22. DBVERIFY - Verification complete

  23. Total Pages Examined         : 6400
  24. Total Pages Processed (Data) : 0
  25. Total Pages Failing   (Data) : 0
  26. Total Pages Processed (Index): 0
  27. Total Pages Failing   (Index): 0
  28. Total Pages Processed (Other): 1
  29. Total Pages Processed (Seg)  : 0
  30. Total Pages Failing   (Seg)  : 0
  31. Total Pages Empty            : 6399
  32. Total Pages Marked Corrupt   : 0
  33. Total Pages Influx           : 0
  34. Highest block SCN            : 0 (0.0)
复制代码
2. rman检查
  1. [oracle@win0105rac1 ~]$ rman target / nocatalog

  2. Recovery Manager: Release 10.2.0.4.0 - Production on Mon May 2 04:22:12 2011

  3. Copyright (c) 1982, 2007, Oracle.  All rights reserved.

  4. connected to target database: DAVIDLOC (DBID=764783080)
  5. using target database control file instead of recovery catalog

  6. RMAN> run {
  7. 2> allocate channel d1 type disk;
  8. 3> allocate channel d2 type disk;
  9. 4> allocate channel d3 type disk;
  10. 5> allocate channel d4 type disk;
  11. 6> backup validate check logical database;
  12. 7> release channel d1;
  13. 8> release channel d2;
  14. 9> release channel d3;
  15. 10> release channel d4;
  16. 11> }

  17. allocated channel: d1
  18. channel d1: sid=145 devtype=DISK

  19. allocated channel: d2
  20. channel d2: sid=144 devtype=DISK

  21. allocated channel: d3
  22. channel d3: sid=143 devtype=DISK

  23. allocated channel: d4
  24. channel d4: sid=142 devtype=DISK

  25. Starting backup at 02-MAY-11
  26. channel d1: starting full datafile backupset
  27. channel d1: specifying datafile(s) in backupset
  28. input datafile fno=00004 name=/oradata/davidloc/davidloc/users01.dbf
  29. channel d2: starting full datafile backupset
  30. channel d2: specifying datafile(s) in backupset
  31. input datafile fno=00001 name=/oradata/davidloc/davidloc/system01.dbf
  32. input datafile fno=00005 name=/oradata/davidloc/davidloc/system02.dbf
  33. channel d3: starting full datafile backupset
  34. channel d3: specifying datafile(s) in backupset
  35. input datafile fno=00002 name=/oradata/davidloc/davidloc/undotbs101.dbf
  36. input datafile fno=00003 name=/oradata/davidloc/davidloc/sysaux01.dbf
  37. channel d4: starting full datafile backupset
  38. channel d4: specifying datafile(s) in backupset
  39. including current control file in backupset
  40. channel d4: backup set complete, elapsed time: 00:00:08
  41. channel d4: starting full datafile backupset
  42. channel d4: specifying datafile(s) in backupset
  43. including current SPFILE in backupset
  44. channel d4: backup set complete, elapsed time: 00:00:07
  45. channel d3: backup set complete, elapsed time: 00:00:20
  46. channel d1: backup set complete, elapsed time: 00:00:35
  47. channel d2: backup set complete, elapsed time: 00:00:35
  48. Finished backup at 02-MAY-11

  49. released channel: d1

  50. released channel: d2

  51. released channel: d3

  52. released channel: d4

  53. RMAN> exit


  54. Recovery Manager complete.
复制代码
3. v$database_block_corruption视图查询

  1. SQL>  select * from V$DATABASE_BLOCK_CORRUPTION
  2.   2  ;

  3. no rows selected
复制代码
4. 步骤3无结果返回,步骤4未执行。

数据库冒似没有坏块。。。

回复 只看该作者 道具 举报

7#
发表于 2013-2-28 20:24:08
X$KTFBHC
         [k]ernel [t]ablespace [f]ile [b]itmapped
           [h]eader [c]ontrol

重启一下是否问题消失?

怀疑是 文件头的 bitmap 有问题了, 考虑 导出数据 并重建数据库吧

回复 只看该作者 道具 举报

8#
发表于 2013-2-28 22:01:18
恩,已经让他们导出数据了,准备重建。

重启过,还是一样的问题。

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-27 01:40 , Processed in 0.054330 second(s), 23 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569