首页 | 互联网 | IT动态 | IT培训 | Cisco | Windows | Linux | Java | .Net | Oracle | 软件测试 | C/C++ | 嵌入式开发 | 存储世界 | 服务器
网络设备 | IDC | 安全 | 求职招聘 | 数字网校 | 网页设计 | 平面设计 | 技术专题 | 电子书下载 | 教学视频 | 源码下载 | 搜索 | 博客 | 论坛
中国IT实验室Oracle频道
中国IT教育
Google
首页 入门基础 安装配置 体系架构 PLSQL 备份恢复 性能调优 开发技术 资讯动态 考试认证 下载 专题 讨论
您现在的位置: 中国IT实验室 >> Oracle >> 入门基础 >> 正文

Oracle中独一无二的Cache对象


bootstarp的对象都是在1.417之前的,当然有部分对象是基于Cluster创建的。

那么这个对象在启动之前有什么作用呢?

itpub上的jametong同学给出了一个重要的信息,在SYSTEM文件头,Oracle存储了一个root dba:
Root dba: This field only occurs in data file #1, and is the location of blocks required
during bootstrapping the data dictionary (bootstrap$)

这个root dba指向了1.417对象,而1.417对象的上一个对象正是bootstrap$,Oracle通过1.417找到了bootstrap$对象就可以启动了数据库。
我们可以从文件头的转储中找到这个root dba,以下是一个Oracle9i的数据文件头信息:

DATA FILE #1:
  (name #9) /opt/oracle/oradata/eygle/system01.dbf
creation size=0 block size=8192 status=0xe head=9 tail=9 dup=1
tablespace 0, index=1 krfil=1 prev_file=0
unrecoverable scn: 0x0004.6c4b5cba 04/10/2007 13:34:26
Checkpoint cnt:6933 scn: 0x0004.6c4dfc0c 04/16/2007 14:38:05
Stop scn: 0xffff.ffffffff 04/07/2007 21:03:02
Creation Checkpointed at scn:  0x0000.00000007 04/24/2006 11:34:39
thread:0 rba:(0x0.0.0)
enabled  threads:  00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000
Offline scn: 0x0004.6c432ebf prev_range: 0
Online Checkpointed at scn:  0x0004.6c432ec0 03/28/2007 11:22:37
thread:1 rba:(0x1.2.0)
enabled  threads:  01000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
FILE HEADER:
        Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
        Db ID=1407686520=0x53e79778, Db Name='EYGLE'
        Activation ID=0=0x0
        Control Seq=1299557=0x13d465, File size=27017=0x6989
        File Number=1, Blksiz=8192, File Type=3 DATA
Tablespace #0 - SYSTEM  rel_fn:1
Creation  at  scn: 0x0000.00000007 04/24/2006 11:34:39
Backup taken at scn: 0x0004.6c2d657e 02/12/2007 15:54:52 thread:1
reset logs count:0x24dc1f7d scn: 0x0004.6c432ec0 recovered at 04/07/2007 21:04:11
status:0x4 root dba:0x004001a1 chkpt cnt: 6933 ctl cnt:6932
begin-hot-backup file size: 32000
Checkpointed at scn:  0x0004.6c4dfc0c 04/16/2007 14:38:05
thread:1 rba:(0x17.2.10)
enabled  threads:  01000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000
Backup Checkpointed at scn:  0x0004.6c2d657e 02/12/2007 15:54:52
thread:1 rba:(0x18e1.30.10)
enabled  threads:  01000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00


这个root dba:0x004001a1 正好指向的是file 1 block 417

而我们dump file 1 block 417就可以找到bootstrap$的地址:
Start dump data blocks tsn: 0 file#: 1 minblk 417 maxblk 419
buffer tsn: 0 rdba: 0x004001a1 (1/417)
scn: 0x0004.6c47f014 seq: 0x01 flg: 0x04 tail: 0xf0140d01
frmt: 0x02 chkval: 0xa59e type: 0x0d=Compatibility segment
Header:  size 12  next rdba 0x0  entries 25  offset 536f
Compatibility entry for 'COMPATSG':
  Size: 24  Release 0x134217728  By 0x153092096
Dump of memory from 0x0AA84E34 to 0x0AA84E38
AA84E30          00000000                        [....]       
Compatibility entry for 'BOOTSTRP':
  Size: 24  Release 0x134217728  By 0x153092096
Dump of memory from 0x0AA84E4C to 0x0AA84E50
AA84E40                            00400179             [y.@.]
Compatibility entry for 'UNDODATA':
  Size: 36  Release 0x153092096  By 0x153092096
Dump of memory from 0x0AA84E64 to 0x0AA84E74
AA84E60          00000042 5221003E 6C47F00D      [B...>.!R..Gl]
AA84E70 00000004                            [....]           


dba号00400179 正好指向的file 1 block 377.

在Oracle10g中,Oracle将这个root dba更改得更为直接:
DATA FILE #1:
  (name #7) +ORADG/danaly/datafile/system.264.600173859
creation size=38400 block size=8192 status=0xe head=7 tail=7 dup=1
tablespace 0, index=1 krfil=1 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:45507 scn: 0x081a.88397cdd 04/19/2007 10:36:17
Stop scn: 0xffff.ffffffff 01/27/2007 17:56:34
Creation Checkpointed at scn:  0x0000.00000007 09/03/2006 10:57:47
thread:1 rba:(0x1.3.10)
enabled  threads:  01000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000
Offline scn: 0x0000.00000000 prev_range: 0
Online Checkpointed at scn:  0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled  threads:  00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
V10 STYLE FILE HEADER:
        Compatibility Vsn = 169869568=0xa200100
        Db ID=3965153484=0xec5770cc, Db Name='DANALY'
        Activation ID=0=0x0
        Control Seq=2912565=0x2c7135, File size=84180=0x148d4
        File Number=1, Blksiz=8192, File Type=3 DATA
Tablespace #0 - SYSTEM  rel_fn:1
Creation  at  scn: 0x0000.00000007 09/03/2006 10:57:47
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
reset logs count:0x23c5ed0c scn: 0x0000.00000001 reset logs terminal rcv data:0x0 scn: 0x0000.00000000
prev reset logs count:0x0 scn: 0x0000.00000000 prev reset logs terminal rcv data:0x0 scn: 0x0000.00000000
recovered at 01/28/2007 21:29:12
status:0x2004 root dba:0x00400179 chkpt cnt: 45507 ctl cnt:45506
begin-hot-backup file size: 0


这里的root dba直接指向了0x00400179 ,也就是file 1 block 377.

随之,这个唯一的Cache的对象在Oracle10g中不复存在。
SQL> select COUNT(*) from dba_segments where segment_type='CACHE';

  COUNT(*)
----------
        0



 

上一页  [1] [2] [3] 下一页

【责编:Peng】

中国IT教育

相关产品和培训
文章评论
 友情推荐链接
 认证培训
 专题推荐

 ·关于Java框架技术专题
 ·XML全攻略技术专题
 ·JAVA开源技术介绍专题
 ·Java嵌入式开发之J2ME技术专题
 ·超前体验 Oracle 11g的5个新特性…
 ·揭密使用VB.NET的五个实用技巧
 ·Oracle和SQL Server常用函数对比专题…
 ·展现C#世界 C#程序设计专题…
 ·Java入门 Tomcat的配置技巧精华专题…
 ·Oracle RMAN物理备份技术详解…
 今日更新
 社区讨论
 博客论点
 频道精选
 Oracle频道相关导航