使用DUL和ODU抽取Exadata上的oracle数据库(抽取磁盘上的数据文件)

联系:QQ(5163721)

标题:使用DUL和ODU抽取Exadata上的oracle数据库(抽取磁盘上的数据文件)

作者:Lunar©版权所有[文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.]

之前研究过dul和odu,发现不能识别磁盘,当时犯了一个错误,因为普通环境(非exadata环境),都是在主机上运行扫描磁盘的工作,因此我之前也在exadata的主机上扫描磁盘,发现不行,具体参见:
在Exadata上,为什么 DUL 和 ODU不能读取ASM数据库的数据,但是Kfed却可以?
今天在exadata的存储节点(cell节点)上配置了一下,发现dul和odu都可以直接扫描磁盘,以后有exadata上oracle数据库损坏时,请联系我,O(∩_∩)O哈哈
具体测试如下:

[root@dm01cel01 lunar]# ./dul

Data UnLoader: 10.2.0.6.5 - Internal Only - on Tue Jun 23 20:30:37 2015
with 64-bit io functions

Copyright (c) 1994 2015 Bernard van Duijnen All rights reserved.

 Strictly Oracle Internal Use Only


DUL: Warning: Could not open parameter file <init.dul>
DUL: Warning: Compatible is set to 10 Values can be 6|7|8|9|10
DUL: Warning: no parameter file means no logfile

DUL: Warning: block 0 is not a disk header block
DUL: Warning: ASM Block type 32 not handled yet
...................
DUL>扫描磁盘

............
DUL: Error: INCSEQ mismatch[8388877!=427426078]
DUL: Error: While processing unknown file unknown block
offset 33605120 possible block of size 512
DUL: Error: INCSEQ mismatch[8388892!=23134477]
DUL: Error: While processing unknown file unknown block
DUL: Error: block trailer mismatch found 0X0080011C expect 0X0A611C80
DUL: Error: checksum should be unused: 0x0a64
DUL: Error: While processing unknown file unknown block
DUL: Error: block trailer mismatch found 0X0080011B expect 0X02540C80

............

DUL: Error: block trailer mismatch found 0X00800888 expect 0X021B0D80
DUL: Error: checksum should be unused: 0x0229
DUL: Error: While processing unknown file unknown block
DUL: Error: INCSEQ mismatch[8390800!=961087622]
DUL: Error: While processing unknown file unknown block
Found file   2 block 88576 type 32 offs 46137344 delta 69398953984
extent of 512 blocks
Found file   1 block 102400 type 6 offs 50331648 delta 35148267520
extent of 473 blocks
Found file   2 block 98816 type 32 offs 54525952 delta 69474451456
extent of 512 blocks
Found file   2 block 107008 type 32 offs 58720256 delta 69537366016
extent of 512 blocks
Found file   2 block 111104 type 32 offs 62914560 delta 69566726144
extent of 512 blocks
Found file   2 block 125440 type 32 offs 67108864 delta 69679972352
extent of 512 blocks
Found file 352 block  7168 type 6 offs 71303168 delta 12094615322624
extent of 512 blocks
Found file 352 block 25600 type 6 offs 75497472 delta 12094762123264
extent of 512 blocks
Found file 352 block 44032 type 32 offs 79691776 delta 12094908923904
extent of 512 blocks
Found file 352 block 46592 type 6 offs 83886080 delta 12094925701120
extent of 512 blocks
Found file 352 block 58880 type 6 offs 88080384 delta 12095022170112
extent of 512 blocks
Found file 352 block 62464 type 32 offs 92274688 delta 12095047335936
extent of 512 blocks
Found file 352 block 66048 type 6 offs 96468992 delta 12095072501760
extent of 512 blocks
Found file 352 block 78848 type 32 offs 100663296 delta 12095173165056
extent of 512 blocks
Found file 352 block 80896 type 6 offs 104857600 delta 12095185747968
extent of 512 blocks
Found file 352 block 87552 type 6 offs 109051904 delta 12095236079616
extent of 512 blocks
Found file 352 block 89600 type 6 offs 113246208 delta 12095248662528
extent of 512 blocks
Found file 352 block 98304 type 6 offs 117440512 delta 12095315771392
extent of 512 blocks
Found file 352 block 99328 type 6 offs 121634816 delta 12095319965696

Found file 381 block 2410496 type 6 offs 54836330496 delta 13055970770944
extent of 512 blocks
Found file 381 block 2422272 type 32 offs 54840524800 delta 13056063045632
^C
[root@dm01cel01 lunar]# 

这里我使用control+C终止了,因为磁盘太大了,扫描时间太久,上面的信息已经可以证明,至少可以扫描
至于normal external等其他问题,以后再说。

扫描文件具体如下:

[root@dm01cel01 lunar]# ll
total 3172
-rw-r--r-- 1 root      root      71 Jun 23 20:30 control.dul
-rwxrwxr-x 1 celladmin 1000 1101896 May  5 00:14 dul
-rw-r--r-- 1 root      root  487424 Jun 23 20:36 IDX_DATA1.dat
[root@dm01cel01 lunar]# head IDX_DATA1.dat
D /dev/sdc
B 46137344 8477184 1 6687
T 46145536 8477185 7 6687
T 46202880 8477192 8 6643
T 46268416 8477200 8 6649
T 46333952 8477208 8 6651
T 46399488 8477216 8 6657
T 46465024 8477224 8 6653
T 46530560 8477232 8 6655
T 46596096 8477240 8 6687
[root@dm01cel01 lunar]#

这里 IDX_DATA1.dat 就是dul扫描出来的一些信息,之后使用命令抽成文件就依据这些。

再看看ODU:

[root@dm01cel01 odu]# ./odu

Oracle Data Unloader trial version 4.1.3

Copyright (c) 2008,2009,2010,2011 XiongJun. All rights reserved.

Web: http://www.oracleodu.com
Email: magic007cn@gmail.com

loading default config.......

byte_order little
block_size  8192
block_buffers 1024
error at line 3.
db_timezone -7
Invalid db timezone:-7
client_timezone 8
Invalid client timezone:8
asmfile_extract_path   /tmp/lunar
.......

scan disk start: 2015-06-23 21:19:25
scanning disk...
writing file error No space left on device
writing file error No space left on device
writing file error No space left on device
writing file error No space left on device
writing file error No space left on device
writing file error No space left on device
writing file error No space left on device
writing file error No space left on device
writing file error No space left on device
writing file error No space left on device
writing file error No space left on device

..........

writing file error No space left on device
writing file error No space left on device

这里报错是因为cell上磁盘空间很小,稍微一折腾就满了(存放ODU抽取文件的是根,100%了):

[root@dm01cel01 odu]# ll
total 18280
-rw-r--r-- 1 root root        16109568 Jun 23 21:20 asmblocks.odu
-rwxrwxrwx 1 root root             353 Jun 23 21:15 asmdisk.txt
-rwxrwxrwx 1 root root             560 Jun 23 21:10 config.txt
-rwxrwxrwx 1 root root             118 Mar 22  2011 control.txt
drwxr-xr-x 2  501 cellmonitor     4096 May 15  2009 data
-rwxrwxrwx 1 root root         2588361 Feb  2  2012 odu
-rw-r--r-- 1 root root               0 Jun 23 20:45 odu_trace.txt
[root@dm01cel01 odu]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/md5        9.9G  9.9G     0 100% /
tmpfs            48G  4.0K   48G   1% /dev/shm
/dev/md7        3.0G  1.7G  1.2G  58% /opt/oracle
/dev/md4        114M   25M   84M  23% /boot
/dev/md11       5.0G  199M  4.5G   5% /var/log/oracle
[root@dm01cel01 odu]#

先别急删除,进去看看数据;

[root@dm01cel01 odu]# cd data
/tmp/lunar/odu/data
[root@dm01cel01 data]# ll
total 0
[root@dm01cel01 data]# cd ..
[root@dm01cel01 odu]# ll
total 18280
-rw-r--r-- 1 root root        16109568 Jun 23 21:20 asmblocks.odu
-rwxrwxrwx 1 root root             353 Jun 23 21:15 asmdisk.txt
-rwxrwxrwx 1 root root             560 Jun 23 21:10 config.txt
-rwxrwxrwx 1 root root             118 Mar 22  2011 control.txt
drwxr-xr-x 2  501 cellmonitor     4096 May 15  2009 data
-rwxrwxrwx 1 root root         2588361 Feb  2  2012 odu
-rw-r--r-- 1 root root               0 Jun 23 20:45 odu_trace.txt
[root@dm01cel01 odu]# 
[root@dm01cel01 odu]# more asmblocks.odu 
########################################################################################
##  data_obj#,block_type, scn_base,scn_wrap,group_no,disk_no,au_no,au_block_no,rdba#####
#########################################################################################
105140,6,2084721470,1468,1,20,13,1,8478721
105140,6,2084721466,1468,1,20,13,2,8478722
105140,6,2084761650,1468,1,20,13,3,8478723
105140,6,2084721466,1468,1,20,13,4,8478724
105140,6,2084721466,1468,1,20,13,5,8478725
105140,6,2084721466,1468,1,20,13,6,8478726
105140,6,2084721466,1468,1,20,13,7,8478727
105052,6,2084729409,1468,1,20,13,9,8478729
105052,6,2084754575,1468,1,20,13,10,8478730
105052,6,2084729334,1468,1,20,13,11,8478731
105052,6,2084729334,1468,1,20,13,12,8478732
105052,6,2084729334,1468,1,20,13,13,8478733
105052,6,2084729409,1468,1,20,13,14,8478734
105052,6,2084739193,1468,1,20,13,15,8478735
105108,6,2084768994,1468,1,20,13,17,8478737
105108,6,2084768948,1468,1,20,13,18,8478738
105108,6,2084729462,1468,1,20,13,19,8478739
105108,6,2084753947,1468,1,20,13,20,8478740
105108,6,2084738498,1468,1,20,13,21,8478741
105108,6,2084760977,1468,1,20,13,22,8478742
105108,6,2084760977,1468,1,20,13,23,8478743
105096,6,2084746973,1468,1,20,13,25,8478745
105096,6,2084728789,1468,1,20,13,26,8478746
105096,6,2084738658,1468,1,20,13,27,8478747
105096,6,2084728789,1468,1,20,13,28,8478748
105096,6,2084746205,1468,1,20,13,29,8478749
105096,6,2084746264,1468,1,20,13,30,8478750
105096,6,2084761170,1468,1,20,13,31,8478751
105048,6,2084738715,1468,1,20,13,33,8478753
105048,6,2084761180,1468,1,20,13,34,8478754
105048,6,2084761188,1468,1,20,13,35,8478755
105048,6,2084738679,1468,1,20,13,36,8478756
105048,6,2084754128,1468,1,20,13,37,8478757
105048,6,2084738715,1468,1,20,13,38,8478758
105048,6,2084738715,1468,1,20,13,39,8478759
6580,6,2084212809,1468,1,20,13,40,8478760
6580,6,2084649441,1468,1,20,13,41,8478761
[root@dm01cel01 odu]#
。。。
[root@dm01cel01 odu]# cd ..
[root@dm01cel01 lunar]# ll
total 2743224
-rw-r--r-- 1 root      root        847249408 Jun 23 21:19 1.dbf
-rw-r--r-- 1 root      root        901775360 Jun 23 21:19 2.dbf
-rw-r--r-- 1 root      root      33260830720 Jun 23 21:19 352.dbf
-rw-r--r-- 1 root      root      19101519872 Jun 23 21:20 353.dbf
-rw-r--r-- 1 root      root               71 Jun 23 20:30 control.dul
-rwxrwxr-x 1 celladmin      1000     1101896 May  5 00:14 dul
-rw-r--r-- 1 root      root           487424 Jun 23 20:36 IDX_DATA1.dat
drwxr-xr-x 3       501 cellusers        4096 Jun 23 21:15 odu
[root@dm01cel01 lunar]# 

可以看到,odu也抽出了数据, 并且,可以看到,已经抽取了几个dbf的数据文件。

此条目发表在 ASM, backup&recovery, DUL ODU, Exadata 分类目录,贴了 , , , 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注