首页 > 大数据 > 数据挖掘 > 注我已经定义101对应控制文件,并且实
pread(256, "\25\302\0\0\32\1\0\0b\275\0\0\377\377\1\4\3270\0\0\27\2\2\0\345\7\0\0\0\0\0\0"..., 16384, 4620288) = 16384
--//应该读的位置在控制文件偏移16384,245760,278528,4620288.
$ echo 16384,245760,278528,4620288 | tr ',' '\n' | xargs -IQ bash -c "echo Q/16384| bc "| paste -sd','
1,15,17,282
--//关闭数据库,重新启动数据库到mount状态.这样启动后应该不变.
SYS@book> startup mount
ORACLE instance started.
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
Database mounted.
SYS@book> select CONTROLFILE_SEQUENCE# from v$database;
CONTROLFILE_SEQUENCE#
---------------------
36580
--//36580 = 0x8ee4,颠倒过来就是0xe48e.
$ echo 1,15,17,282 | tr ',' '\n' | xargs -IQ echo -e 'set dba 101,Q\nfind /x e48e top' | rlbbed
BBED: Release 2.0.0.0.0 - Limited Production on Wed Feb 24 15:59:39 2021
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED> set count 64
COUNT 64
BBED> set width 160
WIDTH 160
BBED> DBA 0x19400001 (423624705 101,1)
BBED> File: /mnt/ramdisk/book/control01.ctl (101)
Block: 1 Offsets: 40 to 103 Dba:0x19400001
------------------------------------------------------------------------------------------------------------------------------------------------
e48e0000 8c020000 00400000 00000100 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5e89c659 ae1e7135
<64 bytes per line>
BBED> DBA 0x1940000f (423624719 101,15)
BBED> BBED-00212: search string not found
BBED> DBA 0x19400011 (423624721 101,17)
BBED> BBED-00212: search string not found
BBED> DBA 0x1940011a (423624986 101,282)
BBED> BBED-00212: search string not found
--//注我已经定义101对应控制文件,并且实际上指定101,自动设置blocksize=16384,不需要设定.
$ ls -l /mnt/ramdisk/book/control01.ctl
-rw-r----- 1 oracle oinstall 10698752 2021-02-24 16:03:22 /mnt/ramdisk/book/control01.ctl
--//10698752/16384 = 653,从0开始到652,控制文件的0块也是OS头,你可以使用xxd -c 16 /mnt/ramdisk/book/control01.ctl查看.
$ xxd -c 16 /mnt/ramdisk/book/control01.ctl | head -6
0000000: 00c2 0000 0000 c0ff 0000 0000 0000 0000 .?...?........
0000010: eaf8 0000 0040 0000 8c02 0000 7d7c 7b7a 犋...@......}||z
~~~~~~~~~=>奇幻数,数据文件以及日志文件都有类似标识.
0000020: a081 0000 0000 0000 0000 0000 0000 0000 ................
0000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69995498/viewspace-2761190/ ,如需转载,请注明出处,否则将追究法律责任。