7.1 Object Types
(1)Objects aregrouped in namespaces according to their type.
(2)Each object can only be of onetype.
(3)All the objects of the same typeare in the same namespace.
(4)A namespace may be used by morethan one type.
(5)The most important namespace iscalled cursor (CRSR) and houses the shared SQL cursors.
7.2 Object Names
(1)Library cache object names havethree parts:
Nameof schema
Nameof object
Nameof database link (remote objects only)
(2)The format used isSCHEMA.NAME@DBLINK.
Forexample, HR.EMPLOYEES@ACME.COM
7.3 Object Flags
(1)Public flags:
Arenot protected by pins or latches
Indicatein detail the type of the object
(2)Status flags:
Areprotected by pins
Indicatewhether the object is being created/dropped/altered/updated
(3)Special status flags:
Areprotected by the library cache latch
Arerelated to object validity and authorization
7.4 Object Tables
(1)Dependency table
(2)Child table
(3)Translation table
(4)Authorization table
(5)Access table
(6)Read-only dependency table
(7)Schema name table
Object Table 又分为以上7中类型。
7.4.1 dependency table
指向本对象所依赖的对象,比如:select * from emp这个cursor的对象,依赖emp这个表,这里指向了emp这个表的handle。
7.4.2.child table
指向本对象的子对象,比如某个游标的子游标。通俗点说,就是一条SQL 至少有一个parent cursor 和 child cursor。 可能一些SQL 由于某些原因无法共享childcursor,这样就会出现一个parentcursor 和 多个child cursor的情况。 即version count 很高。 那么这种情况下。 parent cursor 里对应的所有childcursor的指针都会保存在child table里面。 Oracle 是用C 写的,所以这里是指针。
注意一点,parent cursor和child cursor都是用library cache object handle 存储在Library Cache里的。即他们的结构完全一样。
这个结论可以通过library cache的dump 文件来证明。在后面我们会做一个测试。
Oracle 高 Version counts 问题说明 http://www.linuxidc.com/Linux/2011-07/39429.htm
7.4.3.authorization table
对象的授权信息。
7.5 Object Data Blocks
(1)The remainder ofan object’s data is stored in other independent data heaps.
(2)The object structure contains anarray of data block structures.
(3)The data blockstructures have a pointer to a different data heap.
(4)An object structure has room for 16data block structures but not all of them are in use.
Heap0 也仅仅保存是一个结构,它不保存实际的data。 而实际data 的存储Heap 的指针就存放在这个Data Blocks里。 这个也可以通过dump 来查看。这个Data Blocks指向的Heap 结构如下图:

这里要注意的,就是我们SQL的执行计划就是存放在这个Heap 6:SQL Context 中。
