Dul基本使用

WBOY
WBOYasal
2016-06-07 16:37:512848semak imbas

这几天朋友问我dul怎么用,抽时间给他做了个实验。其实网上已经有很多dul的使用方法,而且我也不推荐使用dul、odu这样的工具去恢复数据,这是体力活的. 而且现在最新版都是时间限制,好像是40多天,具体的忘记了。希望大家不要用到此种类似的工具 dul主要的

这几天朋友问我dul怎么用,抽时间给他做了个实验。其实网上已经有很多dul的使用方法,而且我也不推荐使用dul、odu这样的工具去恢复数据,这是体力活的.
而且现在最新版都是时间限制,好像是40多天,具体的忘记了。希望大家不要用到此种类似的工具

dul主要的参数文件为init.dul 下面是个例子

╭─oracle@enmotech ~/dul  
╰─?  cat init.dul 
osd_big_endian_flag=false   --小字节平台
osd_dba_file_bits=10
osd_c_struct_alignment=32
osd_file_leader_size=1
osd_word_size = 32
#osd这些参数涉及到主机平台的
feedback = 1000
dc_columns=2000000
dc_tables=10000
dc_objects=1000000
dc_users=400
dc_segments=100000
USE_LOB_FILES =TRUE
CONTROL_FILE = file.txt  --指定了要抽出的文件信息
LDR_ENCLOSE_CHAR=|
db_block_size=8192
export_mode=FALSE  --使用文件格式导出文件,true导出dmp文件 
 
compatible=11

dul第二个主要文件是CONTROL_FILE参数指定的文件,. 下面是个例子

╭─oracle@enmotech ~/dul  
╰─?  cat file.txt 
         0          1 /oradata/orcl/system01.dbf
         1          2 /oradata/orcl/sysaux01.dbf
         2          3 /oradata/orcl/undotbs01.dbf
         4          4 /oradata/orcl/users01.dbf
        30          5 /oradata/orcl/test01.dbf
        28          6 /oradata/orcl/dbtk.dbf
        29          7 /oradata/orcl/ignite.dbf
         5          8 /oradata/orcl/goldengate01.dbf
        31          9 /oradata/orcl/ogg_test01.dbf
        33         1024 /oradata/orcl/big_test.dbf
╭─oracle@enmotech ~/dul  
这里也可以直接写文件名
╭─oracle@enmotech ~/dul  
╰─?  cat file.txt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               1 ?
/oradata/orcl/system01.dbf
/oradata/orcl/sysaux01.dbf
/oradata/orcl/undotbs01.dbf
/oradata/orcl/users01.dbf
/oradata/orcl/test01.dbf
/oradata/orcl/dbtk.dbf
/oradata/orcl/ignite.dbf
/oradata/orcl/goldengate01.dbf
/oradata/orcl/ogg_test01.dbf
/oradata/orcl/big_test.dbf
╭─oracle@enmotech ~/dul  
╰─?

下面开始使用,实在system文件存在的前提下

╭─oracle@enmotech ~/dul  
╰─?  ./dul
 
Data UnLoader: 10.2.0.5.32 - Internal Only - on Tue Jul 15 12:22:17 2014
with 64-bit io functions
 
Copyright (c) 1994 2014 Bernard van Duijnen All rights reserved.
 
 Strictly Oracle Internal Use Only
 
 
DUL: Warning: Recreating file "dul.log"
Found db_id = 1348727197
Found db_name = ORCL
DUL> show datafiles   --查看数据文件
ts# rf# start   blocks offs open  err file name
  0   1     0    89601    0    0    0 /oradata/orcl/system01.dbf
  1   2     0   409601    0    0    0 /oradata/orcl/sysaux01.dbf
  2   3     0   240225    0    0    0 /oradata/orcl/undotbs01.dbf
  4   4     0   129601    0    0    0 /oradata/orcl/users01.dbf
 30   5     0     6401    0    0    0 /oradata/orcl/test01.dbf
 28   6     0    75537    0    0    0 /oradata/orcl/dbtk.dbf
 29   7     0    25601    0    0    0 /oradata/orcl/ignite.dbf
  5   8     0     2561    0    0    0 /oradata/orcl/goldengate01.dbf
 31   9     0   118537    0    1    0 /oradata/orcl/ogg_test01.dbf
 33 1024     0    12801    0    1    0 /oradata/orcl/big_test.dbf
DUL> bootstrap     --挖掘数据字典
  2  ;
Probing file = 1, block = 520
. unloading table                BOOTSTRAP$
DUL: Warning: block number is non zero but marked deferred trying to process it anyhow
      60 rows unloaded
DUL: Warning: Dictionary cache DC_BOOTSTRAP is empty
Reading BOOTSTRAP.dat 60 entries loaded
Parsing Bootstrap$ contents
DUL: Warning: Recreating file "dict.ddl"
Generating dict.ddl for version 11
 OBJ$: segobjno 18, file 1 block 240
 TAB$: segobjno 2, tabno 1, file 1  block 144
 COL$: segobjno 2, tabno 5, file 1  block 144
 USER$: segobjno 10, tabno 1, file 1  block 208
Running generated file "@dict.ddl" to unload the dictionary tables
. unloading table                      OBJ$   14530 rows unloaded
. unloading table                      TAB$    1450 rows unloaded
. unloading table                      COL$   63476 rows unloaded
. unloading table                     USER$      45 rows unloaded
Reading USER.dat 45 entries loaded
Reading OBJ.dat 14530 entries loaded and sorted 14530 entries
Reading TAB.dat 1450 entries loaded
Reading COL.dat 63476 entries loaded and sorted 63476 entries
Reading BOOTSTRAP.dat 60 entries loaded
 
DUL: Warning: Recreating file "dict.ddl"
Generating dict.ddl for version 11
 OBJ$: segobjno 18, file 1 block 240
 TAB$: segobjno 2, tabno 1, file 1  block 144
 COL$: segobjno 2, tabno 5, file 1  block 144
 USER$: segobjno 10, tabno 1, file 1  block 208
 TABPART$: segobjno 568, file 1 block 3872
 INDPART$: segobjno 573, file 1 block 3912
 TABCOMPART$: segobjno 590, file 1 block 4056
 INDCOMPART$: segobjno 595, file 1 block 4096
 TABSUBPART$: segobjno 580, file 1 block 3976
 INDSUBPART$: segobjno 585, file 1 block 4016
 IND$: segobjno 2, tabno 3, file 1  block 144
 ICOL$: segobjno 2, tabno 4, file 1  block 144
 LOB$: segobjno 2, tabno 6, file 1  block 144
 COLTYPE$: segobjno 2, tabno 7, file 1  block 144
 TYPE$: segobjno 495, tabno 1, file 1  block 3344
 COLLECTION$: segobjno 495, tabno 2, file 1  block 3344
 ATTRIBUTE$: segobjno 495, tabno 3, file 1  block 3344
 LOBFRAG$: segobjno 601, file 1 block 4144
 LOBCOMPPART$: segobjno 604, file 1 block 4168
 UNDO$: segobjno 15, file 1 block 224
 TS$: segobjno 6, tabno 2, file 1  block 176
 PROPS$: segobjno 98, file 1 block 800
Running generated file "@dict.ddl" to unload the dictionary tables
. unloading table                      OBJ$
DUL: Warning: Recreating file "OBJ.ctl"
   14530 rows unloaded
. unloading table                      TAB$
DUL: Warning: Recreating file "TAB.ctl"
    1450 rows unloaded
. unloading table                      COL$
DUL: Warning: Recreating file "COL.ctl"
   63476 rows unloaded
. unloading table                     USER$
DUL: Warning: Recreating file "USER.ctl"
      45 rows unloaded
. unloading table                  TABPART$     147 rows unloaded
. unloading table                  INDPART$     153 rows unloaded
. unloading table               TABCOMPART$       5 rows unloaded
. unloading table               INDCOMPART$       4 rows unloaded
. unloading table               TABSUBPART$      38 rows unloaded
. unloading table               INDSUBPART$       6 rows unloaded
. unloading table                      IND$    1757 rows unloaded
. unloading table                     ICOL$    3609 rows unloaded
. unloading table                      LOB$     218 rows unloaded
. unloading table                  COLTYPE$    1594 rows unloaded
. unloading table                     TYPE$    1328 rows unloaded
. unloading table               COLLECTION$     338 rows unloaded
. unloading table                ATTRIBUTE$    5676 rows unloaded
. unloading table                  LOBFRAG$       1 row  unloaded
. unloading table              LOBCOMPPART$       0 rows unloaded
. unloading table                     UNDO$      41 rows unloaded
. unloading table                       TS$      36 rows unloaded
. unloading table                    PROPS$      36 rows unloaded
Reading USER.dat 45 entries loaded
Reading OBJ.dat 14530 entries loaded and sorted 14530 entries
Reading TAB.dat 1450 entries loaded
Reading COL.dat 63476 entries loaded and sorted 63476 entries
Reading TABPART.dat 147 entries loaded and sorted 147 entries
Reading TABCOMPART.dat 5 entries loaded and sorted 5 entries
Reading TABSUBPART.dat 38 entries loaded and sorted 38 entries
Reading INDPART.dat 153 entries loaded and sorted 153 entries
Reading INDCOMPART.dat 4 entries loaded and sorted 4 entries
Reading INDSUBPART.dat 6 entries loaded and sorted 6 entries
Reading IND.dat 1757 entries loaded
Reading LOB.dat 218 entries loaded
Reading ICOL.dat 3609 entries loaded
Reading COLTYPE.dat 1594 entries loaded
Reading TYPE.dat 1328 entries loaded
Reading ATTRIBUTE.dat 5676 entries loaded
Reading COLLECTION.dat 338 entries loaded
Reading BOOTSTRAP.dat 60 entries loaded
Reading LOBFRAG.dat 1 entries loaded and sorted 1 entries
Reading LOBCOMPPART.dat 0 entries loaded and sorted 0 entries
Reading UNDO.dat 41 entries loaded
Reading TS.dat 36 entries loaded
Reading PROPS.dat 36 entries loaded
Database character set is ZHS16GBK
Database national character set is AL16UTF16
 
DUL> show undo;  --查看undo
us#     status$ Description     name    segment header block
0       3       KTUINUSE (in use)       SYSTEM          ts 0 file 1 block 128
1       1       KTUINVAL (invalid)      _SYSSMU1_1369880276$            ts 2 file 3 block 128
2       1       KTUINVAL (invalid)      _SYSSMU2_532028113$             ts 2 file 3 block 144
3       1       KTUINVAL (invalid)      _SYSSMU3_2108513962$            ts 2 file 3 block 160
4       1       KTUINVAL (invalid)      _SYSSMU4_3639597549$            ts 2 file 3 block 176
5       1       KTUINVAL (invalid)      _SYSSMU5_3500755112$            ts 2 file 3 block 192
6       1       KTUINVAL (invalid)      _SYSSMU6_2567534412$            ts 2 file 3 block 208
7       1       KTUINVAL (invalid)      _SYSSMU7_3504403778$            ts 2 file 3 block 224
8       1       KTUINVAL (invalid)      _SYSSMU8_2645069961$            ts 2 file 3 block 240
9       1       KTUINVAL (invalid)      _SYSSMU9_595419161$             ts 2 file 3 block 256
10      1       KTUINVAL (invalid)      _SYSSMU10_2169650900$           ts 2 file 3 block 272
11      1       KTUINVAL (invalid)      _SYSSMU11_4171576427$           ts 26 file 7 block 128
12      1       KTUINVAL (invalid)      _SYSSMU12_2246972428$           ts 26 file 7 block 144
13      1       KTUINVAL (invalid)      _SYSSMU13_716936117$            ts 26 file 7 block 160
14      1       KTUINVAL (invalid)      _SYSSMU14_1643483354$           ts 26 file 7 block 176
15      1       KTUINVAL (invalid)      _SYSSMU15_3959622672$           ts 26 file 7 block 192
16      1       KTUINVAL (invalid)      _SYSSMU16_1040802448$           ts 26 file 7 block 208
17      1       KTUINVAL (invalid)      _SYSSMU17_2705027949$           ts 26 file 7 block 224
18      1       KTUINVAL (invalid)      _SYSSMU18_1778755453$           ts 26 file 7 block 240
19      1       KTUINVAL (invalid)      _SYSSMU19_113712248$            ts 26 file 7 block 256
20      1       KTUINVAL (invalid)      _SYSSMU20_3294746070$           ts 26 file 7 block 272
21      2       KTUAVAIL (available)    _SYSSMU21_200063127$            ts 2 file 3 block 128
22      2       KTUAVAIL (available)    _SYSSMU22_2449563750$           ts 2 file 3 block 144
23      2       KTUAVAIL (available)    _SYSSMU23_2921712717$           ts 2 file 3 block 160
24      2       KTUAVAIL (available)    _SYSSMU24_1606202302$           ts 2 file 3 block 176
25      2       KTUAVAIL (available)    _SYSSMU25_2650409587$           ts 2 file 3 block 192
26      2       KTUAVAIL (available)    _SYSSMU26_3913076954$           ts 2 file 3 block 208
27      2       KTUAVAIL (available)    _SYSSMU27_3238715147$           ts 2 file 3 block 224
28      2       KTUAVAIL (available)    _SYSSMU28_2600633533$           ts 2 file 3 block 240
29      2       KTUAVAIL (available)    _SYSSMU29_2643192669$           ts 2 file 3 block 256
30      2       KTUAVAIL (available)    _SYSSMU30_440934135$            ts 2 file 3 block 272
31      1       KTUINVAL (invalid)      _SYSSMU31_2304516445$           ts 27 file 6 block 128
32      1       KTUINVAL (invalid)      _SYSSMU32_3887112535$           ts 27 file 6 block 144
33      1       KTUINVAL (invalid)      _SYSSMU33_88603952$             ts 27 file 6 block 160
34      1       KTUINVAL (invalid)      _SYSSMU34_1689777477$           ts 27 file 6 block 176
35      1       KTUINVAL (invalid)      _SYSSMU35_2746457455$           ts 27 file 6 block 192
36      1       KTUINVAL (invalid)      _SYSSMU36_3504890656$           ts 27 file 6 block 208
37      1       KTUINVAL (invalid)      _SYSSMU37_3917047416$           ts 27 file 6 block 224
38      1       KTUINVAL (invalid)      _SYSSMU38_1684124047$           ts 27 file 6 block 240
39      1       KTUINVAL (invalid)      _SYSSMU39_2587846914$           ts 27 file 6 block 256
40      1       KTUINVAL (invalid)      _SYSSMU40_2956833625$           ts 27 file 6 block 272
 
DUL> desc travel.t1   --查看表结构
  2  ;
Table TRAVEL.T1
obj#= 17424, dataobj#= 17424, ts#= 4, file#= 4, block#=85802
      tab#= 0, segcols= 16, clucols= 0
Column information:
icol# 01 segcol# 01        OWNER len   30 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 02 segcol# 02  OBJECT_NAME len  128 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 03 segcol# 03 SUBOBJECT_NAME len   30 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 04 segcol# 04    OBJECT_ID len   22 type  2 NUMBER(0,-127)
icol# 05 segcol# 05 DATA_OBJECT_ID len   22 type  2 NUMBER(0,-127)
icol# 06 segcol# 06  OBJECT_TYPE len   19 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 07 segcol# 07      CREATED len    7 type 12 DATE
icol# 08 segcol# 08 LAST_DDL_TIME len    7 type 12 DATE
icol# 09 segcol# 09    TIMESTAMP len   19 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 10 segcol# 10       STATUS len    7 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 11 segcol# 11    TEMPORARY len    1 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 12 segcol# 12    GENERATED len    1 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 13 segcol# 13    SECONDARY len    1 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 14 segcol# 14    NAMESPACE len   22 type  2 NUMBER(0,-127)
icol# 15 segcol# 15 EDITION_NAME len   30 type  1 VARCHAR2 cs 852(ZHS16GBK)
icol# 16 segcol# 16           ID len   22 type  2 NUMBER(0,-127)
DUL> unload table travel.t1;     --unload table 
. unloading table                        T1       0 rows unloaded
DUL> unload table travel.t2;
. unloading table                        T2
 . Unloading partition                  T_R_P1
 .   Unloading sub partition              SYS_SUBP64
 . Unloading partition                  T_R_P2
 .   Unloading sub partition              SYS_SUBP65
 . Unloading partition                  T_R_P3
 .   Unloading sub partition               T_R_P3_H1
 .   Unloading sub partition               T_R_P3_H2
 .   Unloading sub partition               T_R_P3_H3
 . Unloading partition                  T_R_PD
 .   Unloading sub partition              SYS_SUBP66
.           table T2 total        2 rows unloaded
DUL>  unload table travel.t3;
. unloading table                        T3    2838 rows unloaded
Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn