【蓋國強】Oracle Wait Event:Data file init write

idba發表於2008-04-16

在一次週末的課程試驗中,頻繁的看到 Data file init write 等待事件。
在這裡做一點記錄說明,以下是來自跟蹤檔案的記錄資訊:

WAIT #2: nam='Data file init write' ela= 13031 count=1 intr=256 timeout=-1 obj#=51706 tim=6068271611
WAIT #2: nam='Data file init write' ela= 118163 count=1 intr=256 timeout=-1 obj#=51706 tim=6068392491
WAIT #2: nam='Data file init write' ela= 94036 count=1 intr=256 timeout=-1 obj#=51706 tim=6068490286
WAIT #2: nam='Data file init write' ela= 52412 count=1 intr=256 timeout=-1 obj#=51706 tim=6068545333
WAIT #2: nam='Data file init write' ela= 4 count=0 intr=32 timeout=2147483647 obj#=51706 tim=6068545596
WAIT #2: nam='Data file init write' ela= 26 count=1 intr=32 timeout=2147483647 obj#=51706 tim=6068545641
WAIT #2: nam='Data file init write' ela= 101743 count=1 intr=256 timeout=-1 obj#=51706 tim=6068648487
WAIT #2: nam='Data file init write' ela= 44854 count=1 intr=256 timeout=-1 obj#=51706 tim=6068694281
WAIT #2: nam='Data file init write' ela= 52841 count=1 intr=256 timeout=-1 obj#=51706 tim=6068748054
WAIT #2: nam='Data file init write' ela= 48984 count=1 intr=256 timeout=-1 obj#=51706 tim=6068798310
WAIT #2: nam='Data file init write' ela= 3 count=0 intr=32 timeout=2147483647 obj#=51706 tim=6068798365
WAIT #2: nam='Data file init write' ela= 26 count=1 intr=32 timeout=2147483647 obj#=51706 tim=6068798409
WAIT #2: nam='Data file init write' ela= 101899 count=1 intr=256 timeout=-1 obj#=51706 tim=6068900931
WAIT #2: nam='Data file init write' ela= 21 count=-1 intr=32 timeout=2147483647 obj#=51706 tim=6068901053


測試資料庫是Oracle10g 10.2.0.3,實際上這個等待事件也是從Oracle 10g開始引入的,用來標識表空間或資料檔案擴充套件時的等待。
Oracle 需要將系統塊格式化為Oracle資料塊,然後才能提供資料庫使用。

在這個流程處理中,Oracle經過如下三個步驟:
1.擴充套件資料檔案

select file# from file$ where ts#=:1

2.更新使用者空間限額

update tsq$ set blocks=:3,maxblocks=:4,grantor#=:5,priv1=:6,priv2=:7,priv3=:8 where ts#=:1 and user#=:2

3.擴充套件資料段

update seg$ set type#=:4,blocks=:5,extents=:6,minexts=:7,maxexts=:8,extsize=:9,extpct=:10,user#=:11,iniexts=:12,lists=decode(:13, 65535, NULL, :13),groups=decode(:14, 65535, NULL, :14), cachehint=:15, hwmincr=:16, spare1=DECODE(:17,0,NULL,:17),scanhint=:18 where ts#=:1 and file#=:2 and block#=:3


這就是Oracle10g中空間擴充套件時內部流程。

-The End-
在一次週末的課程試驗中,頻繁的看到 Data file init write 等待事件。
在這裡做一點記錄說明,以下是來自跟蹤檔案的記錄資訊:

WAIT #2: nam='Data file init write' ela= 13031 count=1 intr=256 timeout=-1 obj#=51706 tim=6068271611
WAIT #2: nam='Data file init write' ela= 118163 count=1 intr=256 timeout=-1 obj#=51706 tim=6068392491
WAIT #2: nam='Data file init write' ela= 94036 count=1 intr=256 timeout=-1 obj#=51706 tim=6068490286
WAIT #2: nam='Data file init write' ela= 52412 count=1 intr=256 timeout=-1 obj#=51706 tim=6068545333
WAIT #2: nam='Data file init write' ela= 4 count=0 intr=32 timeout=2147483647 obj#=51706 tim=6068545596
WAIT #2: nam='Data file init write' ela= 26 count=1 intr=32 timeout=2147483647 obj#=51706 tim=6068545641
WAIT #2: nam='Data file init write' ela= 101743 count=1 intr=256 timeout=-1 obj#=51706 tim=6068648487
WAIT #2: nam='Data file init write' ela= 44854 count=1 intr=256 timeout=-1 obj#=51706 tim=6068694281
WAIT #2: nam='Data file init write' ela= 52841 count=1 intr=256 timeout=-1 obj#=51706 tim=6068748054
WAIT #2: nam='Data file init write' ela= 48984 count=1 intr=256 timeout=-1 obj#=51706 tim=6068798310
WAIT #2: nam='Data file init write' ela= 3 count=0 intr=32 timeout=2147483647 obj#=51706 tim=6068798365
WAIT #2: nam='Data file init write' ela= 26 count=1 intr=32 timeout=2147483647 obj#=51706 tim=6068798409
WAIT #2: nam='Data file init write' ela= 101899 count=1 intr=256 timeout=-1 obj#=51706 tim=6068900931
WAIT #2: nam='Data file init write' ela= 21 count=-1 intr=32 timeout=2147483647 obj#=51706 tim=6068901053


測試資料庫是Oracle10g 10.2.0.3,實際上這個等待事件也是從Oracle 10g開始引入的,用來標識表空間或資料檔案擴充套件時的等待。
Oracle 需要將系統塊格式化為Oracle資料塊,然後才能提供資料庫使用。

在這個流程處理中,Oracle經過如下三個步驟:
1.擴充套件資料檔案

select file# from file$ where ts#=:1

2.更新使用者空間限額

update tsq$ set blocks=:3,maxblocks=:4,grantor#=:5,priv1=:6,priv2=:7,priv3=:8 where ts#=:1 and user#=:2

3.擴充套件資料段

update seg$ set type#=:4,blocks=:5,extents=:6,minexts=:7,maxexts=:8,extsize=:9,extpct=:10,user#=:11,iniexts=:12,lists=decode(:13, 65535, NULL, :13),groups=decode(:14, 65535, NULL, :14), cachehint=:15, hwmincr=:16, spare1=DECODE(:17,0,NULL,:17),scanhint=:18 where ts#=:1 and file#=:2 and block#=:3


這就是Oracle10g中空間擴充套件時內部流程。

-The End-
在一次週末的課程試驗中,頻繁的看到 Data file init write 等待事件。
在這裡做一點記錄說明,以下是來自跟蹤檔案的記錄資訊:

WAIT #2: nam='Data file init write' ela= 13031 count=1 intr=256 timeout=-1 obj#=51706 tim=6068271611
WAIT #2: nam='Data file init write' ela= 118163 count=1 intr=256 timeout=-1 obj#=51706 tim=6068392491
WAIT #2: nam='Data file init write' ela= 94036 count=1 intr=256 timeout=-1 obj#=51706 tim=6068490286
WAIT #2: nam='Data file init write' ela= 52412 count=1 intr=256 timeout=-1 obj#=51706 tim=6068545333
WAIT #2: nam='Data file init write' ela= 4 count=0 intr=32 timeout=2147483647 obj#=51706 tim=6068545596
WAIT #2: nam='Data file init write' ela= 26 count=1 intr=32 timeout=2147483647 obj#=51706 tim=6068545641
WAIT #2: nam='Data file init write' ela= 101743 count=1 intr=256 timeout=-1 obj#=51706 tim=6068648487
WAIT #2: nam='Data file init write' ela= 44854 count=1 intr=256 timeout=-1 obj#=51706 tim=6068694281
WAIT #2: nam='Data file init write' ela= 52841 count=1 intr=256 timeout=-1 obj#=51706 tim=6068748054
WAIT #2: nam='Data file init write' ela= 48984 count=1 intr=256 timeout=-1 obj#=51706 tim=6068798310
WAIT #2: nam='Data file init write' ela= 3 count=0 intr=32 timeout=2147483647 obj#=51706 tim=6068798365
WAIT #2: nam='Data file init write' ela= 26 count=1 intr=32 timeout=2147483647 obj#=51706 tim=6068798409
WAIT #2: nam='Data file init write' ela= 101899 count=1 intr=256 timeout=-1 obj#=51706 tim=6068900931
WAIT #2: nam='Data file init write' ela= 21 count=-1 intr=32 timeout=2147483647 obj#=51706 tim=6068901053


測試資料庫是Oracle10g 10.2.0.3,實際上這個等待事件也是從Oracle 10g開始引入的,用來標識表空間或資料檔案擴充套件時的等待。
Oracle 需要將系統塊格式化為Oracle資料塊,然後才能提供資料庫使用。

在這個流程處理中,Oracle經過如下三個步驟:
1.擴充套件資料檔案

select file# from file$ where ts#=:1

2.更新使用者空間限額

update tsq$ set blocks=:3,maxblocks=:4,grantor#=:5,priv1=:6,priv2=:7,priv3=:8 where ts#=:1 and user#=:2

3.擴充套件資料段

update seg$ set type#=:4,blocks=:5,extents=:6,minexts=:7,maxexts=:8,extsize=:9,extpct=:10,user#=:11,iniexts=:12,lists=decode(:13, 65535, NULL, :13),groups=decode(:14, 65535, NULL, :14), cachehint=:15, hwmincr=:16, spare1=DECODE(:17,0,NULL,:17),scanhint=:18 where ts#=:1 and file#=:2 and block#=:3


這就是Oracle10g中空間擴充套件時內部流程。

-The End-
作者:eygle | English Version 【轉載時請務必以超連結形式標明文章和作者資訊及本宣告
連結:

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/1384/viewspace-237976/,如需轉載,請註明出處,否則將追究法律責任。

相關文章