分类:
2008-10-28 10:11:57
《深入浅出》的一个读者在我的留言板上提出一个问题,他说以下这条命令运行生成的跟踪文件和我书上的结果完全不同:
alter session set events 'immediate trace name controlf level 10';
注意一下他的输出:
DUMP OF CONTROL FILES, Seq # 2017 = 0x7e1
V10 STYLE FILE HEADER:
Compatibility Vsn = 169869568=0xa200100
Db ID=2395540743=0x8ec90d07, Db Name='TESTDB'
Activation ID=0=0x0
Control Seq=2017=0x7e1, File size=932=0x3a4
File Number=0, Blksiz=16384, File Type=1 CONTROL
原来是V10 Style的输出,这是10g的数据库,我书中第一章的来自Oracle9iR2,由于events是Oracle的内部事件,其行为在不同的版本中可能不同。
在Oracle10g中,使用Level 8的trace,得到以下的输出.
在这个输出中,和Oracle9i最大的不同是enabled threads部分增加了位图信息,这个信息的增加我猜测是为了满足Oracle10g Grid运算支持大量并行实例的需要.Level 10及的trace将包含DUMP memory的信息,可读性又有所降低了。
记录一下,还有待于进一步研究:
DUMP OF CONTROL FILES, Seq # 522 = 0x20a
V10 STYLE FILE HEADER:
Compatibility Vsn = 169869568=0xa200100
Db ID=1417824532=0x54824914, Db Name='EYGLE'
Activation ID=0=0x0
Control Seq=522=0x20a, File size=430=0x1ae
File Number=0, Blksiz=16384, File Type=1 CONTROL
***************************************************************************
DATABASE ENTRY
***************************************************************************
(size = 316, compat size = 316, section max = 1, section in-use = 1,
last-recid= 0, old-recno = 0, last-recno = 0)
(extent = 1, blkno = 1, numrecs = 1)
08/17/2006 19:41:08
DB Name "EYGLE"
Database flags = 0x00404000 0x00001000
Controlfile Creation Timestamp 08/17/2006 19:41:09
Incmplt recovery scn: 0x0000.00000000
Resetlogs scn: 0x0000.00000001 Resetlogs Timestamp 08/17/2006 19:41:08
Prior resetlogs scn: 0x0000.00000000 Prior resetlogs Timestamp 01/01/1988 00:00:00
Redo Version: compatible=0xa200100
#Data files = 4, #Online files = 4
Database checkpoint: Thread=1 scn: 0x0000.0007276a
Threads: #Enabled=1, #Open=1, Head=1, Tail=1
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
Max log members = 3, Max data members = 1
Arch list: Head=0, Tail=0, Force scn: 0x0000.0005a8ebscn: 0x0000.00000000
Activation ID: 1417764628
Controlfile Checkpointed at scn: 0x0000.0007281d 02/07/2007 10:20:47
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
.......
[1]