使用 dul 挖数据文件初试

联系:手机(+86 13429648788) QQ(107644445)QQ咨询惜分飞

标题:使用 dul 挖数据文件初试

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

最近测试了下dul,整体感觉和odu差不多
1.配置init.dul

[oracle@xifenfei dul]$ more 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
dc_columns=2000000
dc_tables=10000
dc_objects=1000000
dc_users=400
dc_segments=100000
Buffer=10485760
control_file = control.txt
db_block_size=8192
export_mode=true
--false表示是sqlloader,true表示imp
compatible=10

2.配置控制文件

[oracle@xifenfei dul]$ more control.txt
         0          1 /u01/oracle/oradata/XFF/system01.dbf
         1          2 /u01/oracle/oradata/XFF/undotbs01.dbf
         2          3 /u01/oracle/oradata/XFF/sysaux01.dbf
         4          4 /u01/oracle/oradata/XFF/users01.dbf
         6          5 /u01/oracle/oradata/XFF/datfttuser.dbf

--sql语句
select ts#,rfile#,name from v$datafile;

3.启动dul

[oracle@xifenfei dul]$ ./dul

Data UnLoader: 10.2.0.5.13 - Internal Only - on Sun Jun 10 06:39:47 2012
with 64-bit io functions

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

 Strictly Oracle Internal Use Only


Found db_id = 3426707456
Found db_name = XFF

4.加载初始化数据字典

DUL> BOOTSTRAP;
Probing file = 1, block = 377
. unloading table                BOOTSTRAP$
DUL: Warning: block number is non zero but marked deferred trying to process it anyhow
      57 rows unloaded
DUL: Warning: Dictionary cache DC_BOOTSTRAP is empty
Reading BOOTSTRAP.dat 57 entries loaded
Parsing Bootstrap$ contents
Generating dict.ddl for version 10
 OBJ$: segobjno 18, file 1 block 121
 TAB$: segobjno 2, tabno 1, file 1  block 25
 COL$: segobjno 2, tabno 5, file 1  block 25
 USER$: segobjno 10, tabno 1, file 1  block 89
Running generated file "@dict.ddl" to unload the dictionary tables
. unloading table                      OBJ$   50930 rows unloaded
. unloading table                      TAB$    1593 rows unloaded
. unloading table                      COL$   55163 rows unloaded
. unloading table                     USER$      61 rows unloaded
Reading USER.dat 61 entries loaded
Reading OBJ.dat 50930 entries loaded and sorted 50930 entries
Reading TAB.dat 1593 entries loaded
Reading COL.dat 55163 entries loaded and sorted 55163 entries
Reading BOOTSTRAP.dat 57 entries loaded

DUL: Warning: Recreating file "dict.ddl"
Generating dict.ddl for version 10
 OBJ$: segobjno 18, file 1 block 121
 TAB$: segobjno 2, tabno 1, file 1  block 25
 COL$: segobjno 2, tabno 5, file 1  block 25
 USER$: segobjno 10, tabno 1, file 1  block 89
 TABPART$: segobjno 266, file 1 block 2121
 INDPART$: segobjno 271, file 1 block 2161
 TABCOMPART$: segobjno 288, file 1 block 2297
 INDCOMPART$: segobjno 293, file 1 block 2345
 TABSUBPART$: segobjno 278, file 1 block 2217
 INDSUBPART$: segobjno 283, file 1 block 2257
 IND$: segobjno 2, tabno 3, file 1  block 25
 ICOL$: segobjno 2, tabno 4, file 1  block 25
 LOB$: segobjno 2, tabno 6, file 1  block 25
 COLTYPE$: segobjno 2, tabno 7, file 1  block 25
 TYPE$: segobjno 181, tabno 1, file 1  block 1297
 COLLECTION$: segobjno 181, tabno 2, file 1  block 1297
 ATTRIBUTE$: segobjno 181, tabno 3, file 1  block 1297
 LOBFRAG$: segobjno 299, file 1 block 2393
 LOBCOMPPART$: segobjno 302, file 1 block 2425
 UNDO$: segobjno 15, file 1 block 105
 TS$: segobjno 6, tabno 2, file 1  block 57
 PROPS$: segobjno 96, file 1 block 721
Running generated file "@dict.ddl" to unload the dictionary tables
. unloading table                      OBJ$
DUL: Warning: Recreating file "OBJ.ctl"
   50930 rows unloaded
. unloading table                      TAB$
DUL: Warning: Recreating file "TAB.ctl"
    1593 rows unloaded
. unloading table                      COL$
DUL: Warning: Recreating file "COL.ctl"
   55163 rows unloaded
. unloading table                     USER$
DUL: Warning: Recreating file "USER.ctl"
      61 rows unloaded
. unloading table                  TABPART$      90 rows unloaded
. unloading table                  INDPART$      99 rows unloaded
. unloading table               TABCOMPART$       0 rows unloaded
. unloading table               INDCOMPART$       0 rows unloaded
. unloading table               TABSUBPART$       0 rows unloaded
. unloading table               INDSUBPART$       0 rows unloaded
. unloading table                      IND$    2251 rows unloaded
. unloading table                     ICOL$    3669 rows unloaded
. unloading table                      LOB$     537 rows unloaded
. unloading table                  COLTYPE$    1702 rows unloaded
. unloading table                     TYPE$    1886 rows unloaded
. unloading table               COLLECTION$     552 rows unloaded
. unloading table                ATTRIBUTE$    7051 rows unloaded
. unloading table                  LOBFRAG$       1 row  unloaded
. unloading table              LOBCOMPPART$       0 rows unloaded
. unloading table                     UNDO$      21 rows unloaded
. unloading table                       TS$       7 rows unloaded
. unloading table                    PROPS$      27 rows unloaded
Reading USER.dat 61 entries loaded
Reading OBJ.dat 50930 entries loaded and sorted 50930 entries
Reading TAB.dat 1593 entries loaded
Reading COL.dat 55163 entries loaded and sorted 55163 entries
Reading TABPART.dat 90 entries loaded and sorted 90 entries
Reading TABCOMPART.dat 0 entries loaded and sorted 0 entries
Reading TABSUBPART.dat 0 entries loaded and sorted 0 entries
Reading INDPART.dat 99 entries loaded and sorted 99 entries
Reading INDCOMPART.dat 0 entries loaded and sorted 0 entries
Reading INDSUBPART.dat 0 entries loaded and sorted 0 entries
Reading IND.dat 2251 entries loaded
Reading LOB.dat 537 entries loaded
Reading ICOL.dat 3669 entries loaded
Reading COLTYPE.dat 1702 entries loaded
Reading TYPE.dat 1886 entries loaded
Reading ATTRIBUTE.dat 7051 entries loaded
Reading COLLECTION.dat 552 entries loaded
Reading BOOTSTRAP.dat 57 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 21 entries loaded
Reading TS.dat 7 entries loaded
Reading PROPS.dat 27 entries loaded
Database character set is ZHS16GBK
Database national character set is AL16UTF16

5.导出某种表

DUL> desc chf.t_xifenfei;
Table CHF.T_XIFENFEI
obj#= 52189, dataobj#= 52189, ts#= 4, file#= 4, block#=123
      tab#= 0, segcols= 2, clucols= 0
Column information:
icol# 01 segcol# 01           ID len   22 type  2 NUMBER(0,-127)
icol# 02 segcol# 02         NAME len  100 type  1 VARCHAR2 cs 852(ZHS16GBK)
DUL> UNLOAD TABLE chf.t_xifenfei;
. unloading table                T_XIFENFEI       2 rows unloaded

6.验证导出dmp文件

[oracle@xifenfei dul]$ strings  CHF_T_XIFENFEI.dmp
EXPORT:V07.00.07
UBernard's DUL
RTABLES
1024
                                                Direct UnLoader(C) in EXPort mode
TABLE "T_XIFENFEI"
CREATE TABLE "T_XIFENFEI"("ID" NUMBER,"NAME" VARCHAR2(100))
INSERT INTO "T_XIFENFEI" ("ID", "NAME") VALUES (:1, :2)
www.xifenfei.com
WWW.XIFENEI.COM
EXIT
此条目发表在 非常规恢复 分类目录,贴了 标签。将固定链接加入收藏夹。

使用 dul 挖数据文件初试》有 2 条评论

  1. 惜分飞 说:

    dul 10参数说明

    _SLPE_DEBUG               : INTERNAL: compare lobpage dbas from inode and from scan
    ALLOW_CHECKSUM_MISMATCH   : DISCOURAGED: allow block checksum mismatch
    ALLOW_DBA_MISMATCH        : DISCOURAGED: allow wrong dba in block
    ALLOW_OTHER_OBJNO         : allow other objno in segment header(for out of sync data dictionaries)
    ALLOW_TRAILER_MISMATCH    : DISCOURAGED: allow block trailer/incseq mismatch
    ASM_DO_HARD_CHECKS        : Use H.A.R.D. checks to verify mirrors
    AUTO_UPDATE_CHECKSUM      : When patching automatically update the checksum
    AUTO_UPDATE_TRAILER       : When patching automatically update the trailer
    BUFFER                    : row output buffer size
    CF_FILES                  : Size of control file entry table
    CF_TABLESPACES            : Size of Tablespace Controlfile Cache
    COMPATIBLE                : database version (6|7|8|8.1|9|10)
    CONTROL_FILE              : DUL control file name
    DB_BLOCK_SIZE             : Oracle Data Block Size
    DB_NAME                   : database name in file header
    DB_ID                     : Database ID in file header
    DC_COLUMNS                : Size of Column Dictionary Cache
    DC_OBJECTS                : Size of Object Dictionary Cache
    DC_TABLES                 : Size of Table Dictionary Cache
    DC_USERS                  : Size of Users Dictionary Cache
    DC_SEGMENTS               : Size of the Scanned Segment Dictionary Cache
    DC_EXTENTS                : Size of Scanned Extent Dictionary Cache
    DEFAULT_CHARACTER_SET     : Default character set Name or numeric id
    DEFAULT_NATIONAL_CHARACTER_SET : Default National Character set Name or numeric id
    EXPORT_MODE               : EXPort output MODE or SQL*Loader like output
    FEEDBACK                  : display progress every x rows/blocks (0)
    FILE                      : Output (dump or data) file name
    FILE_SIZE_IN_MB           : max output file size, enables splitting output files
    LDR_ENCLOSE_CHAR          : Character to enclose strings
    LDR_OUTPUT_IN_UTF8        : Convert (N)Character strings to UTF8 (beta)
    LDR_PHYS_REC_SIZE         : SQL*Loader physical record size
    LOGFILE                   : DUL logfile
    MAX_OPEN_FILES            : Maximum # files that are concurrently kept open
    OSD_MAX_THREADS           : Port specific maximum number of threads
    OSD_BIG_ENDIAN_FLAG       : Byte order in machine word
    OSD_DBA_FILE_BITS         : File Number Size in DBA
    OSD_FILE_LEADER_SIZE      : bytes/blocks before file header block
    OSD_C_STRUCT_ALIGNMENT    : C Structure member alignment (0, 16, 32 or 64)
    OSD_WORD_SIZE             : Size of a machine word always 32, except for MS/DOS(16)
    PARSE_HEX_ESCAPES         : Use \xhh hex escape sequences in strings while parsing
    RESET_LOGFILE             : truncate the logfile on each invocation
    SCAN_DATABASE_SCANS_LOB_SEGMENTS : builds (possibly huge) SCANNEDLOBPAGE.dat  to locate missing lob pages and for unload lob segment
    SCAN_STEP_SIZE            : Step/Alignment size while scanning raw device
    TRACE_FLAGS               : DUL Internal Tracing Options
    UNEXP_MAX_ERRORS          : max errors in a single table/partition during unexp
    UNEXP_VERBOSE             : a little bit more output during scan, but much slower
    USE_LOB_FILES             : to get old behaviour with each lob in its own lobfile
    USE_SCANNED_EXTENT_MAP    : Use the scanned extent map in case of corrupted or missing segment headers
    VERIFY_NUMBER_PRECISION   : Check precision and scale of numbers during conversion
    WARN_RECREATE_FILES       : Issue a warning message if a data/export/control file will be recreated
    WRITABLE_DATAFILES        : Allow DUL to update a data file, only required for FORMAT, UPDATE and SCAN DEVICE
    

      [引用]  [回复]

  2. jyc 说:

    这个dul支持asm吗?从哪里可以下载到?

      [引用]  [回复]

发表评论

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

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>