萬盛學電腦網

 萬盛學電腦網 >> 數據庫 >> oracle教程 >> 系統對象IDL

系統對象IDL

在ITPUB上有朋友遇到SYSTEM表空間快速擴展的問題 系統表空間異常擴展的情況遇到過很多:
有的和用戶表空間或對象分配不當有關
有的和高級復制的空間使用有關....

經過如下代碼查詢,可以找出系統表空間中占用空間最多的Top9對象:

col segment_name for a25
col owner for a10
SELECT *
FROM (SELECT BYTES, segment_name, segment_type, owner
FROM dba_segments
WHERE tablespace_name = 'SYSTEM'
ORDER BY BYTES DESC)
WHERE ROWNUM < 10
/

這個朋友的Top9對象為:

1 3082174464 IDL_UB1$ TABLE SYS
2 63979520 SOURCE$ TABLE SYS
3 12075008 IDL_UB2$ TABLE SYS
4 7749632 DEPENDENCY$ TABLE SYS
5 7356416 I_DEPENDENCY2 INDEX SYS
6 6438912 I_DEPENDENCY1 INDEX SYS
7 5521408 I_IDL_UB11 INDEX SYS
8 4341760 IDL_SB4$ TABLE SYS
9 3555328 I_ACCESS1 INDEX SYS

我們注意到占用空間最大的對象是IDL_UB1$系統表,空間占用近3G,那麼這個表是做什麼用的呢?
從sql.bsq中我們可以找到這個表的創建語句:

create table idl_ub1$ /* idl table for ub1 pieces */
( obj# number not null, /* object number */
part number not null,
/* part: 0 = diana, 1 = portable pcode, 2 = machine-dependent pcode */
version number, /* version number */
piece# number not null, /* piece number */
length number not null, /* piece length */
piece long raw not null) /* ub1 piece */
storage (initial 10k next 100k maxextents unlimited pctincrease 0)
/

idl_ub1$表是用來存儲PL/SQL的代碼單元的,包括DIANA等,IDL在這裡代表Interface Definition Language.
這個對象的含義可以從Ixora找到一點提示:

It is an intermediate language in which the structure of database tables and the logic of PL/SQL program units can be consistently represented as attributed trees. Oracle uses the DIANA IDL, which comes from compilers for the Ada programming language. DIANA stands for Descriptive Intermediate Attributed Notation for Ada. Anyway, this is one of four tables in the data dictionary used to store the DIANA for PL/SQL program units, and the database objects that they reference.


在高級復制中會用到這個表,所以可能導致這個表快速增長,在Oracle10g之前,高級復制需要考慮的事情的確很多。

-The End-

原文地址:http://www.eygle.com/archives/2007/01/idl_ub1_table.html

copyright © 萬盛學電腦網 all rights reserved