[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;,因为这个时候无法识别文件号,
--一些视图对象还无法访问。

时间: 2024-11-09 09:39:29

[20161129]奇怪的转储命令.txt的相关文章

[20150902]rman的list archivelog命令.txt

[20150902]rman的list archivelog命令.txt --昨天同事要查询2015/8/13号日志,要确定需要检查日志的范围: RMAN> list archivelog all  completed between '2015-08-13' and '2015-08-13 18:00:00'; List of Archived Log Copies for database with db_unique_name xxxxxx ========================

[20170705]理解linux su命令.txt

[20170705]理解linux su命令.txt --//我一般在维护时经常使用root用户登录,然后su - oracle 转到其他用户操作 --//一般都加入 - 参数.这个已经成了条件反射...^_^. # man su       Change the effective user id and group id to that of USER. -, -l, --login make the shell a login shell --//也就是使用login里面的shell,设置

[20161228]sql语句父子游标的堆转储2.txt

[20161228]sql语句父子游标的堆转储2.txt --以前仅仅看了父游标堆0的堆转储,链接:http://blog.itpub.net/267265/viewspace-2076605/ --尽然当时没有做子游标堆0,6的堆转储,今天测试看看. 1.环境: SYS@book> @ &r/ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -----------

[20150515]关于块转储问题.txt

[20150515]关于块转储问题.txt --我自己在学习oracle有时候使用块转储时,发现转储的内容跟我自己的想象不一样. --正好前一阵子ITPUB有人也遇到类似的问题,自己做一个简单探究: 1.建立测试环境: SCOTT@test> @ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -------------- -----------------------

[20160405]bbed的assign命令.txt

[20160405]bbed的assign命令.txt --我记得开始学习bbed的时候,看的是一份pdf文档,提到assign的用法,摘要如下: assign The assign command does symbolic assignment, with type and range checking. Either target or source can be omitted for the current offset.  For example, the following com

[20140411]windows的forfiles命令.txt

[20140411]windows的forfiles命令.txt 大家知道在linux/unix下删除特定时间以前的文件是find+rm命令来操作,在windows下有一个forfiles命令可以完成. C:\Windows\SysWOW64>forfiles.exe /? FORFILES [/P pathname] [/M searchmask] [/S]          [/C command] [/D [+ | -] {yyyy/MM/dd | dd}] 描述:     选择一个文件(

[20130727]linux下使用taskset命令.txt

[20130727]linux下使用taskset命令.txt # rpm -qilf `which taskset`Name        : schedutils                   Relocations: (not relocatable)Version     : 1.4.0                             Vendor: Red Hat, Inc.Release     : 2                             Build

[20121121]关于linux下history命令.txt

[20121121]关于linux下history命令.txt 昨天跟别人聊天,提到linux下history命令带来的安全隐患,主要是一些命令会记录在~/.bash_history中.实际上有许多方法可以使系统不记录这样一些命令,自己也看了一些文档,总结如下: 1.使用环境变量HISTCONTROL. export HISTCONTROL=ignorespace 如果设置HISTCONTROL=ignorespace,这样开头有空格的命令就不会记录.例子: export HISTCONTROL

[20131109]deferred segment creation与12c的exp命令.txt

[20131109]deferred segment creation与12c的exp命令.txt 参考链接:http://space.itpub.net/267265/viewspace-713311 昨天想导出一些数据在自己的12c测试环境,发现具有段延迟建立特性的表使用exp也能导出. 例子如下: SCOTT@test01p> @ver BANNER