« 光纤通道故障导致数据库崩溃 | Blog首页 | DBA警世录:人祸猛于虎 »
Oracle中独一无二的Cache对象
作者:eygle | 【转载请注出处】|【云和恩墨 领先的zData数据库一体机 | zCloud PaaS云管平台 | SQM SQL审核平台 | ZDBM 数据库备份一体机】
链接:https://www.eygle.com/archives/2007/04/cache_bootstrap.html
在Oracle10g之前,数据库中存在一个独一无二的Cache对象,这个对象就是:链接:https://www.eygle.com/archives/2007/04/cache_bootstrap.html
SQL> select segment_name,segment_type,header_file,header_block
2 from dba_segments where segment_type='CACHE';
SEGMENT_NAME SEGMENT_TYPE HEADER_FILE HEADER_BLOCK
-------------------- ------------------ ----------- ------------
1.417 CACHE 1 417
这个对象的名称来自于文件号和数据块号,1.417正好就是文件1的第417个数据块。
这个Cache对象在Oracle数据库中的含义非同一般,在bootstrap$的过程中,这个对象之前的所有对象都需要用来bootstrap。
我们看一下1.417之前的所有对象:
SQL> select b.object_id,a.segment_name,a.segment_type,a.header_block from dba_segments a,dba_objects b
2 where a.segment_name=b.object_name(+) and a.header_file=1 and a.header_block <= 417
3 order by a.header_block
4 /
OBJECT_ID SEGMENT_NAME SEGMENT_TYPE HEADER_BLOCK
---------- -------------------- ------------------ ------------
SYSTEM ROLLBACK 9
2 C_OBJ# CLUSTER 25
3 I_OBJ# INDEX 49
6 C_TS# CLUSTER 57
7 I_TS# INDEX 65
8 C_FILE#_BLOCK# CLUSTER 73
9 I_FILE#_BLOCK# INDEX 81
10 C_USER# CLUSTER 89
11 I_USER# INDEX 97
15 UNDO$ TABLE 105
17 FILE$ TABLE 113
18 OBJ$ TABLE 121
23 PROXY_DATA$ TABLE 129
24 I_PROXY_DATA$ INDEX 137
25 PROXY_ROLE_DATA$ TABLE 145
26 I_PROXY_ROLE_DATA$_1 INDEX 153
27 I_PROXY_ROLE_DATA$_2 INDEX 161
28 CON$ TABLE 169
29 C_COBJ# CLUSTER 177
30 I_COBJ# INDEX 185
OBJECT_ID SEGMENT_NAME SEGMENT_TYPE HEADER_BLOCK
---------- -------------------- ------------------ ------------
33 I_TAB1 INDEX 193
34 I_UNDO1 INDEX 201
35 I_UNDO2 INDEX 209
36 I_OBJ1 INDEX 217
37 I_OBJ2 INDEX 225
38 I_OBJ3 INDEX 233
39 I_IND1 INDEX 241
40 I_ICOL1 INDEX 249
41 I_FILE1 INDEX 257
42 I_FILE2 INDEX 265
43 I_TS1 INDEX 273
44 I_USER1 INDEX 281
45 I_COL1 INDEX 289
46 I_COL2 INDEX 297
47 I_COL3 INDEX 305
48 I_CON1 INDEX 313
49 I_CON2 INDEX 321
50 I_CDEF1 INDEX 329
51 I_CDEF2 INDEX 337
52 I_CDEF3 INDEX 345
53 I_CDEF4 INDEX 353
OBJECT_ID SEGMENT_NAME SEGMENT_TYPE HEADER_BLOCK
---------- -------------------- ------------------ ------------
54 I_CCOL1 INDEX 361
55 I_CCOL2 INDEX 369
56 BOOTSTRAP$ TABLE 377
1.417 CACHE 417
45 rows selected
一共有44个对象。我们再来看一下初始化过程中bootstrap$中的信息:
SQL> select * from bootstrap$ order by obj#;
LINE# OBJ# SQL_TEXT
---------- ---------- --------------------------------------------------------------------------------
-1 -1 8.0.0.0.0
0 0 CREATE ROLLBACK SEGMENT SYSTEM STORAGE ( INITIAL 112K NEXT 1024K MINEXTENTS 1 M
2 2 CREATE CLUSTER C_OBJ#("OBJ#" NUMBER) PCTFREE 5 PCTUSED 40 INITRANS 2 MAXTRANS 25
3 3 CREATE INDEX I_OBJ# ON CLUSTER C_OBJ# PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE
4 4 CREATE TABLE TAB$("OBJ#" NUMBER NOT NULL,"DATAOBJ#" NUMBER,"TS#" NUMBER NOT NULL
5 5 CREATE TABLE CLU$("OBJ#" NUMBER NOT NULL,"DATAOBJ#" NUMBER,"TS#" NUMBER NOT NULL
6 6 CREATE CLUSTER C_TS#("TS#" NUMBER) PCTFREE 10 PCTUSED 40 INITRANS 2 MAXTRANS 255
7 7 CREATE INDEX I_TS# ON CLUSTER C_TS# PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (
8 8 CREATE CLUSTER C_FILE#_BLOCK#("TS#" NUMBER,"SEGFILE#" NUMBER,"SEGBLOCK#" NUMBER)
9 9 CREATE INDEX I_FILE#_BLOCK# ON CLUSTER C_FILE#_BLOCK# PCTFREE 10 INITRANS 2 MAXT
10 10 CREATE CLUSTER C_USER#("USER#" NUMBER) PCTFREE 10 PCTUSED 40 INITRANS 2 MAXTRANS
11 11 CREATE INDEX I_USER# ON CLUSTER C_USER# PCTFREE 10 INITRANS 2 MAXTRANS 255 STORA
12 12 CREATE TABLE FET$("TS#" NUMBER NOT NULL,"FILE#" NUMBER NOT NULL,"BLOCK#" NUMBER
13 13 CREATE TABLE UET$("SEGFILE#" NUMBER NOT NULL,"SEGBLOCK#" NUMBER NOT NULL,"EXT#"
14 14 CREATE TABLE SEG$("FILE#" NUMBER NOT NULL,"BLOCK#" NUMBER NOT NULL,"TYPE#" NUMBE
15 15 CREATE TABLE UNDO$("US#" NUMBER NOT NULL,"NAME" VARCHAR2(30) NOT NULL,"USER#" NU
16 16 CREATE TABLE TS$("TS#" NUMBER NOT NULL,"NAME" VARCHAR2(30) NOT NULL,"OWNER#" NUM
17 17 CREATE TABLE FILE$("FILE#" NUMBER NOT NULL,"STATUS$" NUMBER NOT NULL,"BLOCKS" NU
18 18 CREATE TABLE OBJ$("OBJ#" NUMBER NOT NULL,"DATAOBJ#" NUMBER,"OWNER#" NUMBER NOT N
19 19 CREATE TABLE IND$("OBJ#" NUMBER NOT NULL,"DATAOBJ#" NUMBER,"TS#" NUMBER NOT NULL
LINE# OBJ# SQL_TEXT
---------- ---------- --------------------------------------------------------------------------------
20 20 CREATE TABLE ICOL$("OBJ#" NUMBER NOT NULL,"BO#" NUMBER NOT NULL,"COL#" NUMBER NO
21 21 CREATE TABLE COL$("OBJ#" NUMBER NOT NULL,"COL#" NUMBER NOT NULL,"SEGCOL#" NUMBER
22 22 CREATE TABLE USER$("USER#" NUMBER NOT NULL,"NAME" VARCHAR2(30) NOT NULL,"TYPE#"
23 23 CREATE TABLE PROXY_DATA$("CLIENT#" NUMBER NOT NULL,"PROXY#" NUMBER NOT NULL,"CRE
24 24 CREATE UNIQUE INDEX I_PROXY_DATA$ ON PROXY_DATA$(CLIENT#,PROXY#) PCTFREE 10 INIT
25 25 CREATE TABLE PROXY_ROLE_DATA$("CLIENT#" NUMBER NOT NULL,"PROXY#" NUMBER NOT NULL
26 26 CREATE INDEX I_PROXY_ROLE_DATA$_1 ON PROXY_ROLE_DATA$(CLIENT#,PROXY#) PCTFREE 10
27 27 CREATE UNIQUE INDEX I_PROXY_ROLE_DATA$_2 ON PROXY_ROLE_DATA$(CLIENT#,PROXY#,ROLE
28 28 CREATE TABLE CON$("OWNER#" NUMBER NOT NULL,"NAME" VARCHAR2(30) NOT NULL,"CON#" N
29 29 CREATE CLUSTER C_COBJ#("OBJ#" NUMBER) PCTFREE 0 PCTUSED 50 INITRANS 2 MAXTRANS 2
30 30 CREATE INDEX I_COBJ# ON CLUSTER C_COBJ# PCTFREE 10 INITRANS 2 MAXTRANS 255 STORA
31 31 CREATE TABLE CDEF$("CON#" NUMBER NOT NULL,"OBJ#" NUMBER NOT NULL,"COLS" NUMBER,"
32 32 CREATE TABLE CCOL$("CON#" NUMBER NOT NULL,"OBJ#" NUMBER NOT NULL,"COL#" NUMBER N
33 33 CREATE INDEX I_TAB1 ON TAB$(BOBJ#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (
34 34 CREATE UNIQUE INDEX I_UNDO1 ON UNDO$(US#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STO
35 35 CREATE INDEX I_UNDO2 ON UNDO$(NAME) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (
36 36 CREATE UNIQUE INDEX I_OBJ1 ON OBJ$(OBJ#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STOR
37 37 CREATE UNIQUE INDEX I_OBJ2 ON OBJ$(OWNER#,NAME,NAMESPACE,REMOTEOWNER,LINKNAME,SU
38 38 CREATE INDEX I_OBJ3 ON OBJ$(OID$) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (
39 39 CREATE UNIQUE INDEX I_IND1 ON IND$(OBJ#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STOR
40 40 CREATE INDEX I_ICOL1 ON ICOL$(OBJ#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (
LINE# OBJ# SQL_TEXT
---------- ---------- --------------------------------------------------------------------------------
41 41 CREATE UNIQUE INDEX I_FILE1 ON FILE$(FILE#) PCTFREE 10 INITRANS 2 MAXTRANS 255 S
42 42 CREATE UNIQUE INDEX I_FILE2 ON FILE$(TS#,RELFILE#) PCTFREE 10 INITRANS 2 MAXTRAN
43 43 CREATE UNIQUE INDEX I_TS1 ON TS$(NAME) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAG
44 44 CREATE UNIQUE INDEX I_USER1 ON USER$(NAME) PCTFREE 10 INITRANS 2 MAXTRANS 255 ST
45 45 CREATE UNIQUE INDEX I_COL1 ON COL$(OBJ#,NAME) PCTFREE 10 INITRANS 2 MAXTRANS 255
46 46 CREATE INDEX I_COL2 ON COL$(OBJ#,COL#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAG
47 47 CREATE UNIQUE INDEX I_COL3 ON COL$(OBJ#,INTCOL#) PCTFREE 10 INITRANS 2 MAXTRANS
48 48 CREATE UNIQUE INDEX I_CON1 ON CON$(OWNER#,NAME) PCTFREE 10 INITRANS 2 MAXTRANS 2
49 49 CREATE UNIQUE INDEX I_CON2 ON CON$(CON#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STOR
50 50 CREATE UNIQUE INDEX I_CDEF1 ON CDEF$(CON#) PCTFREE 10 INITRANS 2 MAXTRANS 255 ST
51 51 CREATE INDEX I_CDEF2 ON CDEF$(OBJ#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (
52 52 CREATE INDEX I_CDEF3 ON CDEF$(ROBJ#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE
53 53 CREATE INDEX I_CDEF4 ON CDEF$(ENABLED) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAG
54 54 CREATE INDEX I_CCOL1 ON CCOL$(CON#,COL#) PCTFREE 10 INITRANS 2 MAXTRANS 255 STOR
55 55 CREATE UNIQUE INDEX I_CCOL2 ON CCOL$(CON#,INTCOL#) PCTFREE 10 INITRANS 2 MAXTRAN
56 56 CREATE TABLE BOOTSTRAP$("LINE#" NUMBER NOT NULL,"OBJ#" NUMBER NOT NULL,"SQL_TEXT
57 rows selected
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
那么为什么Oracle10g能够作出这样的变更呢?
如果注意一下我们可以发现,cache对象实际上是为了兼容性目的所保留的,其中的主要信息如下:
*** SESSION ID:(9.149) 2007-04-18 21:32:17.682
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 [....]
Compatibility entry for 'LMST':
Size: 20 Release 0x153092096 By 0x153092096
Compatibility entry for 'PDMLITLS':
Size: 20 Release 0x150994944 By 0x153092096
Compatibility entry for 'LOB_RET':
Size: 20 Release 0x153092096 By 0x153092096
Compatibility entry for 'NWIMGFMT':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'FASTDROP':
Size: 20 Release 0x135290880 By 0x153092096
Compatibility entry for 'LOCMGDTS':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'UNDOTBSP':
Size: 20 Release 0x150994944 By 0x153092096
Compatibility entry for 'TEMPTAB':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'PGTMGDTS':
Size: 20 Release 0x150999808 By 0x153092096
Compatibility entry for 'DATETIME':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'OPERATOR':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'VYCLOB':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'SEVTRIG':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'RLENG':
Size: 20 Release 0x153092096 By 0x153092096
Compatibility entry for 'APPCTX':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'HSC':
Size: 20 Release 0x153092096 By 0x153092096
Compatibility entry for 'BMINVPRT':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'EDTRIG':
Size: 20 Release 0x135290880 By 0x153092096
Compatibility entry for 'EXTTAB':
Size: 20 Release 0x150994944 By 0x153092096
Compatibility entry for 'JAVA':
Size: 20 Release 0x135266304 By 0x153092096
Compatibility entry for 'WRDIR':
Size: 20 Release 0x150994944 By 0x153092096
Compatibility entry for 'PLUGTS':
Size: 20 Release 0x135266304 By 0x153092096
buffer tsn: 0 rdba: 0x004001a2 (1/418)
这个信息和v$compatseg的信息完全相同:
SQL> select * from V$COMPATSEG;
TYPE_ID RELEASE UPDATED
-------- -------------------- --------------------
COMPATSG 8.0.0.0.0 9.2.0.0.0
BOOTSTRP 8.0.0.0.0 9.2.0.0.0
UNDODATA 9.2.0.0.0 9.2.0.0.0
LMST 9.2.0.0.0 9.2.0.0.0
PDMLITLS 9.0.0.0.0 9.2.0.0.0
LOB_RET 9.2.0.0.0 9.2.0.0.0
NWIMGFMT 8.1.0.0.0 9.2.0.0.0
FASTDROP 8.1.6.0.0 9.2.0.0.0
LOCMGDTS 8.1.0.0.0 9.2.0.0.0
UNDOTBSP 9.0.0.0.0 9.2.0.0.0
TEMPTAB 8.1.0.0.0 9.2.0.0.0
PGTMGDTS 9.0.1.3.0 9.2.0.0.0
DATETIME 8.1.0.0.0 9.2.0.0.0
OPERATOR 8.1.0.0.0 9.2.0.0.0
VYCLOB 8.1.0.0.0 9.2.0.0.0
SEVTRIG 8.1.0.0.0 9.2.0.0.0
RLENG 9.2.0.0.0 9.2.0.0.0
APPCTX 8.1.0.0.0 9.2.0.0.0
HSC 9.2.0.0.0 9.2.0.0.0
BMINVPRT 8.1.0.0.0 9.2.0.0.0
TYPE_ID RELEASE UPDATED
-------- -------------------- --------------------
EDTRIG 8.1.6.0.0 9.2.0.0.0
EXTTAB 9.0.0.0.0 9.2.0.0.0
JAVA 8.1.0.0.0 9.2.0.0.0
WRDIR 9.0.0.0.0 9.2.0.0.0
PLUGTS 8.1.0.0.0 9.2.0.0.0
25 rows selected
所以在启动数据库时要读取这个信息是因为在每个数据文件头都记录有兼容性信息,如果兼容性设置改变,在数据库启动之前,Oracle需要去更新每个文件头,所以这个信息必须被优先读取。
在Oracle10g中,由于兼容性特典的变更,'V$COMPATSEG'已经不再存在,所以
SQL> select count(*) from dba_objects where object_name='V$COMPATSEG';
COUNT(*)
----------
0
由于这个变化,CACHE对象不再需要,root dba的指向也由此改变。
-The End-
历史上的今天...
>> 2010-04-19文章:
>> 2009-04-19文章:
>> 2005-04-19文章:
By eygle on 2007-04-19 16:44 | Comments (15) | Internal | 1419 |
...
数据库中存在一个独一无二的Cache对性,这个对象就是:
...
这里的对性应该为对象吧.估计为笔误 :-)
深奥
汗,要知道错字总是难免的:)
高, 我知道DUL是找bootstrap的, 可是我写AUL时, 就没有去找bootstrap去获得数据字典表的地址信息.
我曾经以为自己是对的,现在发现距离真理还是有一层纸 :)
看的我晕头转向.
好比倚天屠龙剑出鞘, 各路门派皆俯首称臣.
又好比,
欲练此功,必须XX;
即使XX, 未必成功
泼冷水了, 还望海涵. 嘻嘻...
......
在Oracle10g中,由于兼容性特典的变更
......
是“特点”不是“特典”吧。:D
呵呵,请教一下这个兼容性特点发生了什么变更呢?
9i中不同数据库这个块的位置不是固定的, 10g中总是固定的吗?
不是固定的,但是你的CREATE DATABASE发出之后,就确定了。
象上次将dependency$搞坏了, 在10g中不知道有没有更简洁的办法? 在bootstrap$的记录中好象没有这个表啊.
强贴留名,呵呵,以前看到过有人的bootstrap$数据块损坏导致整个数据库无法启动,我想可不可以这样,我们使用dd将正常的bootstrap$数据块拷贝出来,如果以后bootstrap$数据块有损坏,在将拷贝硬dd进去,因为bootstrap$上面应该是没有DML操作的,这个数据块的SCN应该不怎么改变,文件上的checkpoint也不会扫描推进整个数据文件的数据块SCN
等会找个环境试下看
如果没有位的变化,是可以的;如果行长变了就有问题;bootstrap$损坏通常是人为破坏,这个就比较难搞,但是办法总是有的。
bootstrap$ 拷贝block去覆盖修复的事情,去年底我给人做过一例。虽然没有任何理由……但我还是怀疑是有人捣鬼,怎么会偏偏坏了这个block。
好文章,以前研究过bootstrap$,感觉又有收获!
有空没事研究这些?