首页 » ORACLE 9i-23c » 关于dict与v$fixed_table

关于dict与v$fixed_table

dict 里的条数与fixed_table不一样,网上也有说明,在这总结一下

DICT is a synonym for DICTIONARY
DICTIONARY contains descriptions of data dictionary tables and views.

V$FIXED_TABLE This view displays all dynamic performance tables, views, and derived tables in the database. Some V$ tables (for example, V$ROLLNAME) refer to real tables and are therefore not listed.

dictionary的创建通过查看catalog.sql可以获得oracle创建dict/dictionary数据字典视图的语句
/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/ catalog.sql

SQL> select VIEW_DEFINITION from V$FIxED_VIEW_DEFINITION where VIEW_name=’V$FIXED_TABLE’;

VIEW_DEFINITION
——————————————————————————–
select NAME , OBJECT_ID , TYPE , TABLE_NUM from GV$FIXED_TABLE where inst_id =
USERENV(‘Instance’)

SQL> select VIEW_DEFINITION from V$FIxED_VIEW_DEFINITION where VIEW_name=’GV$FIXED_TABLE’;

VIEW_DEFINITION
——————————————————————————–
select inst_id,kqftanam, kqftaobj, ‘TABLE’, indx from x$kqfta union all select i
nst_id,kqfvinam, kqfviobj, ‘VIEW’, 65537 from x$kqfvi union all select inst_id,k
qfdtnam, kqfdtobj, ‘TABLE’, 65537 from x$kqfdt

再说说oracle 的启动过程
在数据库启动时最先被加载,跟踪数据库的启动过程,我们发现数据库启动的第一个动作就是:

create table bootstrap$ ( line# number not null, obj#
number not null, sql_text varchar2(4000) not null) storage (initial
50K objno 56 extents (file 1 block 377))

这部分代码是写在Oracle应用程序中的,在内存中创建了bootstrap$以后,Oracle就可以从file 1,block 377上读取其他信息,创建重要的数据库对象。

程序中只要提供bootstrap$ 的创建脚本,确定好bootstap$的结构同时指定了段头的位置,然后就能通过段头去获取bootstrap$中的内容,而这些内容就是为一些字典表创建结构的sql_text,这样就因了bootstrap$这个天生的蛋,孵化出了c_obj#,tab$等等鸡,这些鸡又继续生蛋,则完成了数据库字典表结构的建立。也就是说,oracle用关系型表来实现了自身结构的建立。

在这里要注意的一个问题就是,启动过程中create这些数据字典对象,并不是在物理上真正地去创建段,而是在内存中创建对应的结构

X$表由此建立。

以上内容open过程可以看http://www.itpub.net/thread-199099-1-1.html 冯春培 的文章

打赏

目前这篇文章有1条评论(Rss)评论关闭。

  1. Nicolasa Area | #1
    2011-12-21 at 08:24

    I picture this may well be various upon the written content? having said that I nonetheless believe that it may be appropriate for virtually any form of matter material, as a result of it would incessantly be satisfying to decide a warm and delightful face or possibly pay attention a voice when initial landing.