Toad 10.6 去查Oracle 10g 的資料表空間,在Toad 返回頁面提示資訊是:
selectprivileges on following are required:DBA_DATA_FILES,DBA_FREE_SPACE,V$TEMP_SPACE_HEADER,v$TEMP_EXTENT_POOL,DBA_TEMP_FILES.
查看了一下DB 的alert log:
Fri Jun 3 00:05:46 2011
Errors in file/u01/app/oracle/admin/dave1/udump/dave1_ora_21187.trc:
ORA-00600: internal error code, arguments:[ktfbhget-4], [6], [5], [], [], [], [], []
Fri Jun 300:09:37 2011
ORA-1000 encountered when generating server alertSMG-3503
Fri Jun 300:10:41 2011
Errors in file /u01/app/oracle/admin/dave1/udump/dave1_ora_21187.trc:
ORA-00600: internal error code, arguments:[ktfbhget-4],[6], [5], [], [], [], [], []
Fri Jun 3 00:12:48 2011
Errors in file/u01/app/oracle/admin/dave1/udump/dave1_ora_21187.trc:
ORA-00600: internal error code, arguments:[ktfbhget-4], [6], [5], [], [], [], [], []
Fri Jun 3 00:16:40 2011
ORA-1000 encountered whengenerating server alert SMG-3503
看一下trace 檔案:
[oracle@db1 bdump]$ head -100 /u01/app/oracle/admin/dave1/udump/dave1_ora_21187.trc
/u01/app/oracle/admin/dave1/udump/dave1_ora_21187.trc
Oracle Database 10g Enterprise EditionRelease 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Miningoptions
ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_1
System name: Linux
Node name: db1
Release: 2.6.18-164.el5xen
Version: #1 SMP Tue Aug 18 16:06:30 EDT 2009
Machine: i686
Instance name: dave1
Redo thread mounted by this instance: 1
Oracle process number: 17
Unix process pid: 21187, image:oracledave1@db1
*** ACTION NAME:() 2011-06-03 00:05:46.731
*** MODULE NAME:(TOAD 10.6.0.42) 2011-06-0300:05:46.731
*** SERVICE NAME:(dave1) 2011-06-0300:05:46.731
*** SESSION ID:(151.46) 2011-06-0300:05:46.731
*** 2011-06-03 00:05:46.731
ksedmp: internal or fatalerror
ORA-00600:internal error code, arguments: [ktfbhget-4], [6], [5], [], [], [], [], []
Current SQL statement for this session:
select a.tablespace_name,
round(a.bytes_alloc / 1024 / 1024)megs_alloc,
round(nvl(b.bytes_free, 0) / 1024 /1024) megs_free,
round((a.bytes_alloc - nvl(b.bytes_free, 0))/ 1024 / 1024) megs_used,
round((nvl(b.bytes_free, 0) /a.bytes_alloc) * 100) Pct_Free,
100 - round((nvl(b.bytes_free, 0) /a.bytes_alloc) * 100) Pct_used,
round(maxbytes/1048576) Max
from ( select f.tablespace_name,
sum(f.bytes) bytes_alloc,
sum(decode(f.autoextensible,'YES',f.maxbytes,'NO', f.bytes)) maxbytes
from dba_data_files f
group by tablespace_name) a,
( select f.tablespace_name,
sum(f.bytes) bytes_free
from dba_free_space f
group by tablespace_name) b
where a.tablespace_name =b.tablespace_name (+)
union all
select h.tablespace_name,
round(sum(h.bytes_free + h.bytes_used) /1048576) megs_alloc,
round(sum((h.bytes_free + h.bytes_used)- nvl(p.bytes_used, 0)) / 1048576) megs_free,
round(sum(nvl(p.bytes_used, 0))/1048576) megs_used,
round((sum((h.bytes_free + h.bytes_used)- nvl(p.bytes_used, 0)) / sum(h.bytes_used + h.bytes_free)) * 100) Pct_Free,
100 - round((sum((h.bytes_free +h.bytes_used) - nvl(p.bytes_used, 0)) / sum(h.bytes_used + h.bytes_free)) *100) pct_used,
round(sum(f.maxbytes) / 1048576) max
from sys.v_$TEMP_SPACE_HEADER h, sys.v_$Temp_extent_poolp, dba_temp_files f
where p.file_id(+) = h.file_id
and p.tablespace_name(+) = h.tablespace_name
and f.file_id = h.file_id
and f.tablespace_name = h.tablespace_name
group by h.tablespace_name
ORDER BY 1
----- Call Stack Trace-----
calling call entry argument values in hex
location type point (? means dubious value)
-------------------- ---------------------------- ----------------------------
ksedst()+27 call ksedst1() 0 ? 1 ?
ksedmp()+557 call ksedst() 0 ? BF000000 ? 0 ? 0 ?
BFE161C8 ? 9749978 ?
...
--先看ORA-1000的錯誤
[oracle@db1 u01]$ oerr ora 1000
01000, 00000, "maximum open cursorsexceeded"
// *Cause:
// *Action:
SQL> show parameter open_cursors
NAME TYPE VALUE
----------------------------------------------- ------------------------------
open_cursors integer 300
SQL>
SQL> select name,value,display_valuefrom v$parameter where name like '%cursor%';
NAME VALUE DISPLAY_VALUE
----------------------- --------------------------
cursor_space_for_time FALSE FALSE
session_cached_cursors 20 20
cursor_sharing EXACT EXACT
open_cursors 5000 5000
SQL> select count(*) fromv$open_cursor;
COUNT(*)
----------
5115
SQL> alter system setopen_cursors=10000 scope=both;
System altered.
SQL> show parameteropen_cursors
NAME TYPE VALUE
----------------------------------------------- ------------------------------
open_cursors integer 10000
修改之後,問題依舊。
查看dba_data_files 就會報錯:
SQL> select * fromdba_data_files;
ERROR:
ORA-00600: internal errorcode, arguments: [ktfbhget-4], [6], [5], [], [], [],
[], []
no rows selected
根據dba_data_files視圖的定義,確定了是x$tkfbhc字典出問題。
SQL>select text from dba_views whereview_name = 'DBA_DATA_FILES';
SQL> select * from x$ktfbhc;
ERROR:
ORA-00600: internal error code, arguments:[ktfbhget-4],[6], [5], [], [], [],[], []
no rows selected
這個字典的名字和我們的ORA-600 裡的第一個參數名稱一致。x$ktfbhc對象是Kernel Tablespace File BitmapHeader Control,也就是說記錄了本地資料表空間的Bitmap頭控制資訊。
研究了半天,沒能搞定這個錯誤。 我是用sys 使用者串連的,所以許可權這塊的問題可能性不大。 在MOS上搜了半天,ktfbhget這個是有一些,且多與bug 有關。 我搜ktfbhget-4 這個,沒有結果。 我猜這個4可能代表的是datafile 的file no。
這個庫是我的測試庫,DB 版本10.2.0.1, OS版本: redhat 5.4。 本是想把這個問題搞清楚,但是這個已經超出我現在的能力範圍了。 最終把這個庫重建了。
有些問題還是需要深入研究啊。
-------------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
Email: dvd.dba@gmail.com
DBA1 群:62697716(滿); DBA2 群:62697977(滿) DBA3 群:62697850(滿)
DBA 超級群:63306533(滿); DBA4 群: 83829929 DBA5群: 142216823
DBA6 群:158654907 聊天 群:40132017 聊天2群:69087192
--加群需要在備忘說明Oracle資料表空間和資料檔案的關係,否則拒絕申請