oracle 11g bootstrap$系列三

背景

  ORACLE启动非常复杂,进入正题,继续分析oracle mount至open的TRACE FILE。


结论

1,oracle mount到open,先读取控制文件,然后读取每个数据文件,接着读取第1号数据文件SYSTEM的第520数据块,然后在这个数据块创建字典表bootstrap$
2,接着从创建好的bootstrap$把存储在其中的59个对象(包括表,索引,CLUSTER TABLE)全部提取出来,依次创建这59个对象
3,为何是59个对象,因为过滤了bootstrap$表本身
4,依次创建是何义呢,即指定这些59个对象是在哪个文件,哪个数据块,也就是说这些数据块必须要固定在一个固定的位置,不能虽然变换了,我想是ORACLE核心代码固定死了
    还有一个依次的意思,就是以这59个对象obj#的编号大小,依次创建这些对象
5,创建完这些59个对象后,然后使用这些创建好的对象,查询一些对于数据库OPEN有关的信息
6,当然关于创建好这59个对象,ORACLE是如何查询这些59个对象,将在下文进行继续学习
7,引申:bootstrap$表的定义本身就是存储在1号数据文件的520号数据块


  BOOTSTRAP很特殊,它创建好后,由此引导数据库OPEN,可见此表的核心价值与重要性
  还有重要一点,存储这些60个对象的不管是表或是索引或CLUSTER TABLE,它们里面存储的数据,而非DDL,是永远存在在1号数据文件对应的哪些数据块上的,不会每次都去重新插入的
  所以我判断这60个对象的数据是在创建数据库时就已经初始化好了


  既然这60个对象非常重要,如果你破坏了存储这些表的数据块,数据库肯定会出非常严重的问题,当然会是什么问题,我们还要研究


  再是,即使521,522,523这3个数据块是存储了60个对象的数据,如果这3个数据块坏了,哪数据库肯定启不来


8,ORACLE在创建这59个底层对象所采用CREATE TABLE语法,仅适用于这些对象,不适用于普通的表对象


9,还有一点,存储bootstrap$表定义的是在520号数据块,而bootstrap$表存储的内容是存储在521,522,523这几个数据块,可见ORACLE设计的精妙之处


即:
CREATE CLUSTER C_OBJ#("OBJ#" NUMBER) PCTFREE 5 PCTUSED 40 INITRANS 2 MAXTRANS 255 
STORAGE (  INITIAL 136K NEXT 200K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 2 EXTENTS (FILE 1 BLOCK 144)) SIZE 800  


或者


CREATE INDEX I_OBJ# ON CLUSTER C_OBJ# PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (  INITIAL 64K NEXT 1024K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 3 EXTENTS (FILE 1 BLOCK 168))


具体就是说objno及file和block语法不适用于普通表及索引和cluster table


9,10046 trace里面的内容非常好,要进一步分析与理解,确实是利器


测试



摘录有价值的TRACE FILE章节,且分析直接穿插在TRACE FILE中,这样真观性好,便于对比查看。
PARSING IN CURSOR #3 len=19 dep=0 uid=0 oct=35 lid=0 tim=1446298993344797 hv=1907384048 ad='de94ab90' sqlid='a01hp0psv0rrh'
alter database open
END OF STMT
PARSE #3:c=0,e=49292,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=1446298993344796
WAIT #3: nam='control file sequential read' ela= 48 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993365782 ---mount一开始,仍然是读取控制文件的内容
WAIT #3: nam='control file sequential read' ela= 12 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993366007
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993366031
WAIT #3: nam='rdbms ipc reply' ela= 10 from_process=10 timeout=910 p3=0 obj#=-1 tim=1446298993366703
WAIT #3: nam='rdbms ipc reply' ela= 47335 from_process=10 timeout=910 p3=0 obj#=-1 tim=1446298993414059
WAIT #3: nam='control file sequential read' ela= 9 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993414165
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993414187
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993414203
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298993414220
WAIT #3: nam='control file sequential read' ela= 0 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='control file sequential read' ela= 0 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='control file sequential read' ela= 0 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='control file sequential read' ela= 0 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='control file sequential read' ela= 0 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='Disk file operations I/O' ela= 0 FileOperation=2 fileno=1 filetype=2 obj#=-1 tim=1446298993414282  --到这儿,开始从数据文件开始读取内容,等待事件为disk file operations i/o
WAIT #3: nam='Disk file operations I/O' ela= 105 FileOperation=2 fileno=2 filetype=2 obj#=-1 tim=1446298993414389
WAIT #3: nam='Disk file operations I/O' ela= 76 FileOperation=2 fileno=3 filetype=2 obj#=-1 tim=1446298993414489
WAIT #3: nam='Disk file operations I/O' ela= 75 FileOperation=2 fileno=4 filetype=2 obj#=-1 tim=1446298993414578
WAIT #3: nam='Disk file operations I/O' ela= 72 FileOperation=2 fileno=5 filetype=2 obj#=-1 tim=1446298993414662
WAIT #3: nam='Disk file operations I/O' ela= 74 FileOperation=2 fileno=6 filetype=2 obj#=-1 tim=1446298993414751
WAIT #3: nam='Disk file operations I/O' ela= 65 FileOperation=2 fileno=7 filetype=2 obj#=-1 tim=1446298993414827
WAIT #3: nam='Disk file operations I/O' ela= 75 FileOperation=2 fileno=8 filetype=2 obj#=-1 tim=1446298993414914
WAIT #3: nam='Disk file operations I/O' ela= 75 FileOperation=2 fileno=201 filetype=2 obj#=-1 tim=1446298993415022
WAIT #3: nam='Disk file operations I/O' ela= 72 FileOperation=2 fileno=202 filetype=2 obj#=-1 tim=1446298993415107
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=23 blocks=1 obj#=-1 tim=1446298993415129  --读取数据文件,但注意,只是读取每个数据文件的第一个数据块,大家注意看block#=1及blocks=1
WAIT #3: nam='db file sequential read' ela= 12 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993415171
WAIT #3: nam='db file sequential read' ela= 7 file#=2 block#=1 blocks=1 obj#=-1 tim=1446298993415224
WAIT #3: nam='db file sequential read' ela= 7 file#=3 block#=1 blocks=1 obj#=-1 tim=1446298993415267
WAIT #3: nam='db file sequential read' ela= 6 file#=4 block#=1 blocks=1 obj#=-1 tim=1446298993415292
WAIT #3: nam='db file sequential read' ela= 7 file#=5 block#=1 blocks=1 obj#=-1 tim=1446298993415316
WAIT #3: nam='db file sequential read' ela= 89 file#=6 block#=1 blocks=1 obj#=-1 tim=1446298993415418
WAIT #3: nam='db file sequential read' ela= 61 file#=7 block#=1 blocks=1 obj#=-1 tim=1446298993415698
WAIT #3: nam='db file sequential read' ela= 17 file#=8 block#=1 blocks=1 obj#=-1 tim=1446298993415812
WAIT #3: nam='control file parallel write' ela= 384 files=2 block#=17 requests=2 obj#=-1 tim=1446298993416236 --接下来向控制文件写入内容
WAIT #3: nam='control file parallel write' ela= 390 files=2 block#=15 requests=2 obj#=-1 tim=1446298993416662
WAIT #3: nam='control file parallel write' ela= 290 files=2 block#=1 requests=2 obj#=-1 tim=1446298993416976
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993416998
WAIT #3: nam='rdbms ipc reply' ela= 12851 from_process=10 timeout=2147483647 p3=0 obj#=-1 tim=1446298993430071 --和DBWR进程交互通讯,大家注意看from_process=10
WAIT #3: nam='control file sequential read' ela= 10 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993430171 --接着又是读取控制文件
WAIT #3: nam='control file sequential read' ela= 6 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993430197
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=15 blocks=1 obj#=-1 tim=1446298993430214
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=17 blocks=1 obj#=-1 tim=1446298993430230
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=322 blocks=1 obj#=-1 tim=1446298993430256
WAIT #3: nam='control file parallel write' ela= 387 files=2 block#=321 requests=2 obj#=-1 tim=1446298993430661 --继续写入控制文件
WAIT #3: nam='control file parallel write' ela= 329 files=2 block#=18 requests=2 obj#=-1 tim=1446298993431025
WAIT #3: nam='control file parallel write' ela= 249 files=2 block#=16 requests=2 obj#=-1 tim=1446298993431302
WAIT #3: nam='control file parallel write' ela= 264 files=2 block#=1 requests=2 obj#=-1 tim=1446298993431590
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993431611  --读取控制文件
WAIT #3: nam='control file sequential read' ela= 17 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993452234
WAIT #3: nam='control file sequential read' ela= 6 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993452296
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993452315
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993452331
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993452379
WAIT #3: nam='control file sequential read' ela= 4 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993452399
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993452413
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993452427
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=19 blocks=1 obj#=-1 tim=1446298993452446
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993452474
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993452490
WAIT #3: nam='control file sequential read' ela= 3 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993452504


*** 2015-10-31 09:43:14.681
WAIT #3: nam='rdbms ipc reply' ela= 1229042 from_process=11 timeout=1800 p3=0 obj#=-1 tim=1446298994681801 --与LGWR进行通讯
WAIT #3: nam='control file sequential read' ela= 13 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298994705023 --读取控制文件
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298994705064
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298994705081
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298994705098
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298994705126
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298994705142
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298994705156
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298994705172
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298994705195
WAIT #3: nam='control file sequential read' ela= 3 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298994705211
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298994705225
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298994705239
WAIT #3: nam='log file sync' ela= 45112 buffer#=9208 sync scn=61122263 p3=0 obj#=-1 tim=1446298994774045 --LOG FILE SYNC,也就是在MOUNT到OPEN会产生REDO
WAIT #3: nam='control file sequential read' ela= 11 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298994774134  --读取控制文件
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298994774158
WAIT #3: nam='control file sequential read' ela= 7 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298994774176
WAIT #3: nam='control file sequential read' ela= 10 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298994774210
WAIT #3: nam='instance state change' ela= 342 layer=2 value=1 waited=1 obj#=-1 tim=1446298994774606  ---一个新的等待事件,instance state change
WAIT #3: nam='db file sequential read' ela= 11825 file#=1 block#=520 blocks=1 obj#=-1 tim=1446298994848351 ---这个点很重要,大家是:读取数据文件,是读哪个数据文件呢,是1号文件,即SYSTEM数据文件,哪个数据块呢,是520号数据块,
---这个520数据块是什么含义呢,别急往下看
=====================


---看到没有,马上就创建一个bootstrap$底层字典表,并且它是存储在file1 block 520,看到没有,这下就结合起来了,也就是说上面是读取这个bootstap$的
PARSING IN CURSOR #2 len=188 dep=1 uid=0 oct=1 lid=0 tim=1446298994978793 hv=4006182593 ad='de930258' sqlid='32r4f1brckzq1'
create table bootstrap$ ( line#         number not null,   obj#           number not null,   sql_text   varchar2(4000) not null)   storage (initial 50K objno 59 extents (file 1 block 520))
END OF STMT
PARSE #2:c=2000,e=37913,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298994978791
EXEC #2:c=0,e=885,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=0,tim=1446298994979760
CLOSE #2:c=0,e=9,dep=1,type=0,tim=1446298994979890




--我们接着向下看,ORACLE又运行了一个SQL,这个SQL很有意思,它是从上面刚刚创建的bootstrap$表查询一条记录,那么它是查哪个对象?
PARSING IN CURSOR #2 len=55 dep=1 uid=0 oct=3 lid=0 tim=1446298995008810 hv=2111436465 ad='de92f758' sqlid='6apq2rjyxmxpj'
select line#, sql_text from bootstrap$ where obj# != :1
END OF STMT
PARSE #2:c=0,e=28900,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995008808
BINDS #2:
 Bind#0
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=0001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=2b1daf8d5988  bln=22  avl=02  flg=05
  value=59  ---大家别急,看这儿,59号对象,从我本系列文章可知,59号对象就是bootstrap$,也就是说它要查不等于59号对象的所有存储在bootstrap$中的存储内容(大家注意:where obj#!=:1)
EXEC #2:c=2000,e=62029,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=867914364,tim=1446298995070966
WAIT #2: nam='db file sequential read' ela= 37 file#=1 block#=520 blocks=1 obj#=59 tim=1446298995081750 ---接着读取59号对象即bootstrap$表


*** 2015-10-31 09:43:15.209
WAIT #2: nam='db file scattered read' ela= 29786 file#=1 block#=521 blocks=3 obj#=59 tim=1446298995209116  ---这里是个多块读,开始从521数据块读,一直连续读3个块,把这几个数据块中存储的数据提取出来


可见多块读其实就是把存储在bootstrap$中的所有60个底层字典的数据全提取出来
SQL> select obj# from bootstrap$ where DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) in (521,522,523) order by 1;


      OBJ#
----------
        -1
         0
         2
         3
         4
         5
         6
         7
         8
         9
        10


      OBJ#
----------
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21


      OBJ#
----------
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32


      OBJ#
----------
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43


      OBJ#
----------
        44
        45
        46
        47
        48
        49
        50
        51
        52
        53
        54


      OBJ#
----------
        55
        56
        57
        58
        59


60 rows selected.




FETCH #2:c=2000,e=156618,p=4,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227643
FETCH #2:c=0,e=63,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227814
FETCH #2:c=0,e=9,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227849
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227873
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227896
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227918
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227940
略去类似重复内容
FETCH #2:c=0,e=9,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995230000
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995230025
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995230047
FETCH #2:c=0,e=5,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995230068
FETCH #2:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=867914364,tim=1446298995230081
STAT #2 id=1 cnt=59 pid=0 pos=1 obj=59 op='TABLE ACCESS FULL BOOTSTRAP$ (cr=61 pr=4 pw=0 time=0 us)' 
CLOSE #2:c=0,e=28,dep=1,type=0,tim=1446298995279379


根据上述提取出来的内容,创建0号对象SYSTEM ROLLBACK SEGMENT,且指定对象号objno 0,以及指定存储在哪个文件及哪个数据块file 1 block 128
=====================
PARSING IN CURSOR #2 len=129 dep=1 uid=0 oct=36 lid=0 tim=1446298995279788 hv=1119914026 ad='2b1daf8915f8' sqlid='864bmh11c121a'
CREATE ROLLBACK SEGMENT SYSTEM STORAGE (  INITIAL 112K NEXT 56K MINEXTENTS 1 MAXEXTENTS 32765 OBJNO 0 EXTENTS (FILE 1 BLOCK 128))
END OF STMT
PARSE #2:c=0,e=391,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995279787
EXEC #2:c=0,e=29456,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=0,tim=1446298995309292
CLOSE #2:c=0,e=49,dep=1,type=0,tim=1446298995309496
=====================


同上道理,创建2号对象c_obj# cluster table
PARSING IN CURSOR #2 len=209 dep=1 uid=0 oct=4 lid=0 tim=1446298995310005 hv=1323908363 ad='2b1daf8915a8' sqlid='7j058yj7fkg8b'
CREATE CLUSTER C_OBJ#("OBJ#" NUMBER) PCTFREE 5 PCTUSED 40 INITRANS 2 MAXTRANS 255 STORAGE (  INITIAL 136K NEXT 200K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 2 EXTENTS (FILE 1 BLOCK 144)) SIZE 800
END OF STMT
PARSE #2:c=0,e=420,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995310004
EXEC #2:c=999,e=108,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=0,tim=1446298995310161
CLOSE #2:c=0,e=0,dep=1,type=0,tim=1446298995310161
=====================


同上,创建3号对象
PARSING IN CURSOR #2 len=191 dep=1 uid=0 oct=9 lid=0 tim=1446298995331381 hv=2739073813 ad='de92b7c8' sqlid='0cmnx32jn5wsp'
CREATE INDEX I_OBJ# ON CLUSTER C_OBJ# PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (  INITIAL 64K NEXT 1024K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 3 EXTENTS (FILE 1 BLOCK 168))
END OF STMT
PARSE #2:c=1000,e=21156,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=1876228229,tim=1446298995331317
EXEC #2:c=1000,e=206,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1876228229,tim=1446298995332025
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=0 op='INDEX BUILD UNIQUE I_OBJ# (cr=0 pr=0 pw=0 time=0 us)'
STAT #2 id=2 cnt=0 pid=1 pos=1 obj=0 op='SORT CREATE INDEX (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=0)'
STAT #2 id=3 cnt=0 pid=2 pos=1 obj=2 op='TABLE ACCESS FULL C_OBJ# (cr=0 pr=0 pw=0 time=0 us)'
CLOSE #2:c=0,e=6,dep=1,type=0,tim=1446298995332161
=====================


创建4号对象
PARSING IN CURSOR #2 len=827 dep=1 uid=0 oct=1 lid=0 tim=1446298995354831 hv=4071397944 ad='de92a528' sqlid='gsc5dr3tat6js'
CREATE TABLE TAB$("OBJ#" NUMBER NOT NULL,"DATAOBJ#" NUMBER,"TS#" NUMBER NOT NULL,"FILE#" NUMBER NOT NULL,"BLOCK#" NUMBER NOT NULL,"BOBJ#" NUMBER,"TAB#" NUMBER,"COLS" NUMBER NOT NULL,"CLUCOLS" NUMBER,"PCTFREE$" NUMBER NOT NULL,"PCTUSED$" NUMBER NOT NULL,"INITRANS" NUMBER NOT NULL,"MAXTRANS" NUMBER NOT NULL,"FLAGS" NUMBER NOT NULL,"AUDIT$" VARCHAR2(38) NOT NULL,"ROWCNT" NUMBER,"BLKCNT" NUMBER,"EMPCNT" NUMBER,"AVGSPC" NUMBER,"CHNCNT" NUMBER,"AVGRLN" NUMBER,"AVGSPC_FLB" NUMBER,"FLBCNT" NUMBER,"ANALYZETIME" DATE,"SAMPLESIZE" NUMBER,"DEGREE" NUMBER,"INSTANCES" NUMBER,"INTCOLS" NUMBER NOT NULL,"KERNELCOLS" NUMBER NOT NULL,"PROPERTY" NUMBER NOT NULL,"TRIGFLAG" NUMBER,"SPARE1" NUMBER,"SPARE2" NUMBER,"SPARE3" NUMBER,"SPARE4" VARCHAR2(1000),"SPARE5" VARCHAR2(1000),"SPARE6" DATE) STORAGE (  OBJNO 4 TABNO 1) CLUSTER C_OBJ#(OBJ#)
END OF STMT
PARSE #2:c=1000,e=22655,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995354830
EXEC #2:c=0,e=251,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=0,tim=1446298995376306
CLOSE #2:c=0,e=80,dep=1,type=0,tim=1446298995376481




略去中间类似的内容


开始在已经创建好的60个底层字典表中查询某些信息
=====================
PARSING IN CURSOR #1 len=106 dep=1 uid=0 oct=3 lid=0 tim=1446298995983884 hv=3628073639 ad='de8f3788' sqlid='bqbdby3c400p7'
select rowcnt,blkcnt,empcnt,avgspc,chncnt,avgrln,nvl(degree,1), nvl(instances,1) from tab$ where obj# = :1
END OF STMT
PARSE #1:c=0,e=14094,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995983842
=====================
PARSING IN CURSOR #2 len=136 dep=1 uid=0 oct=3 lid=0 tim=1446298995984312 hv=2541974715 ad='de8f3098' sqlid='f8mu51fbs6x5v'
select blevel, leafcnt, distkey, lblkkey, dblkkey, clufac,        nvl(degree,1), nvl(instances,1) from ind$ where bo# = :1 and obj# = :2
END OF STMT
PARSE #2:c=0,e=341,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995984311
=====================
PARSING IN CURSOR #4 len=70 dep=1 uid=0 oct=3 lid=0 tim=1446298995987047 hv=3377894161 ad='de8f29e8' sqlid='32d4jrb4pd4sj'
select charsetid, charsetform from col$  where obj# = :1 and col# = :2
END OF STMT
PARSE #4:c=0,e=2614,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995987047
=====================
PARSING IN CURSOR #5 len=52 dep=1 uid=0 oct=3 lid=0 tim=1446298995988156 hv=429618617 ad='de8f2348' sqlid='4krwuz0ctqxdt'
select ctime, mtime, stime from obj$ where obj# = :1
END OF STMT
PARSE #5:c=1000,e=333,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995988081
BINDS #5:
 Bind#0
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=0001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=2b1daf8d1700  bln=22  avl=02  flg=05
  value=20

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-1821901/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9240380/viewspace-1821901/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值