[20161129]奇怪的轉儲命令.txt
[20161129]奇怪的轉儲命令.txt
--如果你轉儲檔案頭使用如下命令:
SYS@book> alter system dump datafile 6 block 1;
System altered.
Start dump data blocks tsn: 8 file#:6 minblk 1 maxblk 1
Block 1 (file header) not dumped:use dump file header command
End dump data blocks tsn: 7 file#: 6 minblk 2 maxblk 1
--也就是檔案頭不能使用這樣的方式。
SYS@book> alter system dump datafile '/mnt/ramdisk/book/sugar01.dbf' block 1;
System altered.
*** 2016-11-29 15:07:31.354
Start dump data block from file /mnt/ramdisk/book/sugar01.dbf minblk 1 maxblk 1
V10 STYLE FILE HEADER:
Compatibility Vsn = 186647552=0xb200400
Db ID=1337401710=0x4fb7216e, Db Name='BOOK'
Activation ID=0=0x0
Control Seq=43937=0xaba1, File size=5120=0x1400
File Number=6, Blksiz=8192, File Type=3 DATA
Dump all the blocks in range:
End dump data block from file /mnt/ramdisk/book/sugar01.dbf minblk 2 maxblk 1
--至少可以看到dbid
--如果執行如下:
SYS@book> alter system dump datafile '/mnt/ramdisk/book/sugar01.dbf' block 2;
System altered.
*** 2016-11-29 15:12:14.535
Start dump data block from file /mnt/ramdisk/book/sugar01.dbf minblk 2 maxblk 2
V10 STYLE FILE HEADER:
Compatibility Vsn = 186647552=0xb200400
Db ID=1337401710=0x4fb7216e, Db Name='BOOK'
Activation ID=0=0x0
Control Seq=43937=0xaba1, File size=5120=0x1400
File Number=6, Blksiz=8192, File Type=3 DATA
Dump all the blocks in range:
buffer tsn: 7 rdba: 0x01800002 (6/2)
scn: 0x0000.006ec689 seq: 0x02 flg: 0x04 tail: 0xc6891d02
frmt: 0x02 chkval: 0x8d28 type: 0x1d=KTFB Bitmapped File Space Header
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x00007F1C354AEA00 to 0x00007F1C354B0A00
7F1C354AEA00 0000A21D 01800002 006EC689 04020000 [..........n.....]
7F1C354AEA10 00008D28 00000006 00000008 00001400 [(...............]
7F1C354AEA20 00000009 00000800 003FFFFE 0000007E [..........?.~...]
7F1C354AEA30 000013FF 00000050 00000220 006EC688 [....P... .....n.]
7F1C354AEA40 00000000 00000000 00000000 00000000 [................]
7F1C354AEA50 00000300 00000008 00000000 00000000 [................]
7F1C354AEA60 00000000 00000000 00000000 00000000 [................]
Repeat 504 times
7F1C354B09F0 00000000 00000000 00000000 C6891D02 [................]
File Space Header Block:
Header Control:
RelFno: 6, Unit: 8, Size: 5120, Flag: 9
AutoExtend: YES, Increment: 2048, MaxSize: 4194302
Initial Area: 126, Tail: 5119, First: 80, Free: 544
Deallocation scn: 7259784.0
Header Opcode:
Save: No Pending Op
End dump data block from file /mnt/ramdisk/book/sugar01.dbf minblk 2 maxblk 2
--你可以發現這樣實際上訪問2個資料塊。
SYS@book> alter system dump datafile 6 block 2;
System altered.
*** 2016-11-29 15:15:35.925
Start dump data blocks tsn: 7 file#:6 minblk 2 maxblk 2
Block dump from cache:
Dump of buffer cache at level 4 for tsn=7 rdba=25165826
BH (0x73bf96d0) file#: 6 rdba: 0x01800002 (6/2) class: 13 ba: 0x73ba4000
set: 70 pool: 3 bsz: 8192 bsi: 0 sflg: 2 pwc: 35,28
dbwrid: 0 obj: -1 objn: 45 tsn: 7 afn: 6 hint: f
hash: [0x773f98c0,0x849ccd70] lru: [0x73bf98f8,0x73bfa2b8]
ckptq: [NULL] fileq: [NULL] objq: [0x7d1f6fd8,0x7d1f6fd8] objaq: [0x7d1f6fc8,0x7d1f6fc8]
st: XCURRENT md: NULL fpin: 'kttewh00: ktte_get_file_info' tch: 1
flags:
LRBA: [0x0.0.0] LSCN: [0x0.0] HSCN: [0xffff.ffffffff] HSUB: [65535]
Block dump from disk:
buffer tsn: 7 rdba: 0x01800002 (6/2)
scn: 0x0000.006ec689 seq: 0x02 flg: 0x04 tail: 0xc6891d02
frmt: 0x02 chkval: 0x8d28 type: 0x1d=KTFB Bitmapped File Space Header
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x00007F1C354AEA00 to 0x00007F1C354B0A00
7F1C354AEA00 0000A21D 01800002 006EC689 04020000 [..........n.....]
7F1C354AEA10 00008D28 00000006 00000008 00001400 [(...............]
7F1C354AEA20 00000009 00000800 003FFFFE 0000007E [..........?.~...]
7F1C354AEA30 000013FF 00000050 00000220 006EC688 [....P... .....n.]
7F1C354AEA40 00000000 00000000 00000000 00000000 [................]
7F1C354AEA50 00000300 00000008 00000000 00000000 [................]
7F1C354AEA60 00000000 00000000 00000000 00000000 [................]
Repeat 504 times
7F1C354B09F0 00000000 00000000 00000000 C6891D02 [................]
File Space Header Block:
Header Control:
RelFno: 6, Unit: 8, Size: 5120, Flag: 9
AutoExtend: YES, Increment: 2048, MaxSize: 4194302
Initial Area: 126, Tail: 5119, First: 80, Free: 544
Deallocation scn: 7259784.0
Header Opcode:
Save: No Pending Op
End dump data blocks tsn: 7 file#: 6 minblk 2 maxblk 2
--僅僅塊2的資訊。
SYS@book> alter system dump datafile '/mnt/ramdisk/book/sugar01.dbf' block 135;
System altered.
--你可以看到除了檔案頭資訊,還包括塊135的資訊。也就是使用檔名方式要顯示第1塊的相關資訊。
--即使dump帶檔名,要轉儲135塊,這樣寫:
SYS@book> alter system dump datafile '/mnt/ramdisk/book/sugar01.dbf' block min 135 block max 135;
System altered.
SYS@book> alter system dump datafile '/mnt/ramdisk/book/users01.dbf' block min 135 block max 135;
System altered.
--即使這樣也要掃描檔案頭出現如下資訊:
Start dump data block from file /mnt/ramdisk/book/users01.dbf minblk 135 maxblk 135
V10 STYLE FILE HEADER:
Compatibility Vsn = 186647552=0xb200400
Db ID=1337401710=0x4fb7216e, Db Name='BOOK'
Activation ID=0=0x0
Control Seq=44604=0xae3c, File size=6400=0x1900
File Number=4, Blksiz=8192, File Type=3 DATA
Dump all the blocks in range:
buffer tsn: 4 rdba: 0x01000087 (4/135)
scn: 0x0000.000e0ef0 seq: 0x01 flg: 0x06 tail: 0x0ef00601
frmt: 0x02 chkval: 0xe273 type: 0x06=trans data
Hex dump of block: st=0, typ_found=1
--如果你不想使用
alter session set events 'immediate trace name FILE_HDRS level 12';
--要看檔案頭資訊要執行如下:
alter system dump datafile '/mnt/ramdisk/book/sugar01.dbf' block 1;
而不能使用
alter system dump datafile 6 block 1;
--另外一點在mount狀態下,不能使用alter system dump datafile 6 block 2;,因為這個時候無法識別檔案號,
--一些檢視物件還無法訪問。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2129307/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20161129]轉儲記憶體的內容還原成資料塊.txt記憶體
- oracle 跟蹤檔案和轉儲命令及常用轉儲命令(轉)Oracle
- [20220811]奇怪的隱式轉換問題.txt
- [20230905]奇怪的語法.txt
- [20141013]奇怪的sql語句.txtSQL
- [20190306]奇怪的查詢結果.txt
- [20220822]奇怪的ashtop輸出.txt
- [20221103]奇怪的mail資訊(整理版本).txtAI
- [20211210]優化遇到的奇怪問題.txt優化
- 關於轉儲Oracle索引資訊的相關命令Oracle索引
- 轉載 oracle 跟蹤檔案 和轉儲命令Oracle
- oracle 跟蹤檔案和轉儲命令(轉摘)Oracle
- [20170406]關於檔案頭轉儲.txt
- [20231012]奇怪的執行時長.txt
- [20211111]奇怪的ashtop輸出.txt
- [20211018]奇怪的歸檔目的地.txt
- [20131121]奇怪的執行計劃變化.txt
- [20220815]奇怪的隱式轉換問題(11g測試補充).txt
- [20220811]奇怪的隱式轉換問題(12c補充測試).txt
- [20210507]分析library cache轉儲.txt
- 奇怪 sqlplus中 host命令出現lsSQLSQL
- JPG轉TXT的教程
- [20161228]奇怪log file sync等待事件.txt事件
- NIO的奇怪事件 非常奇怪! 救救我!_!事件
- 奇怪的GCDGC
- 奇怪的“物件”物件
- [20181201]奇怪的INDEX SKIP SCAN執行計劃.txtIndex
- [20210524]分析library cache轉儲 3.txt
- [20210524]分析library cache轉儲 4.txt
- [20171228]關於資料塊轉儲的問題.txt
- 一些轉儲和清除記憶體物件和物理物件的命令(轉)記憶體物件
- 一些奇怪的 unix 指令名字的由來(轉)
- oracle 跟蹤檔案和轉儲命令詳解Oracle
- [20210508]分析library cache轉儲 2.txt
- [20160407]sql語句父子游標的堆轉儲.txtSQL
- [20160405]bbed的assign命令.txt
- [20210602]分析library cache轉儲 5.txt
- 在Weblogic+JBuilder7使用時的奇怪問題 (轉)WebUI