DUL第二篇——使用DUL抽取dmp文件内容

联系:QQ(5163721)

标题:DUL第二篇——使用DUL抽取dmp文件内容

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

dul常用命令:
DUL> unload database ;
DUL> unload user ;
DUL> unload table ;
DUL> scan database;
DUL> scan tables;

记录一下测试表的记录数目:

SYS@lunar>select count(*) from lunar.lunar;

  COUNT(*)
----------
     17634  这里我们看到是17634 行记录

Elapsed: 00:00:00.09
SYS@lunar>

其余的配置参数,参考第一篇DUL 第一篇 —— DUL是什么?
启动DUL,然后直接执行unpump header,之后就可以抽取了:

DUL> unpump header dump file lunar.01.dmp;
Version is 769
check sum is 1864601239
data pump id is 6783164
master_obj_no is 18333
header blocks is 1
data pump file number is 1
block size is 4096
character set id is 873
master table block offset is 411
(Master table is at byte offset (411 -1) * 4096 = 1679360)
DUL> unpump table lunar.dmp (OWNER VARCHAR2(30),OBJECT_NAME VARCHAR2(128),SUBOBJECTNAME VARCHAR2(30),OBJECT_ID NUMBER,DATA_OBJECT_ID NUMBER,OBJECT_TYPE VARCHAR2(19),CREATED DATE,LAST_DDL_TIME DATE,TIMESTAMP VARCHAR2(19),STATUS VARCHAR2(7),TEMPORARY VARCHAR2(1),GENERATED VARCHAR2(1),SECONDARY VARCHAR2(1),NAMESPACE NUMBER,EDITION_NAME VARCHAR2(30)) dump file lunar.01.dmp from 15048 until 1676342; 
17634 rows unloaded
DUL> 

这里我们看到17634 行记录全部抽取出来了,如果你想测试的更好玩,可以dd掉其中的一部分数据,然后测试看dul怎么工作。

然后直接导入数据,就这么简单,O(∩_∩)O哈哈~


[oracle@lunar dul]$ sqlldr userid=lunar/lunar control=/home/oracle/test/dul/dump000.ctl

SQL*Loader: Release 11.2.0.3.0 - Production on Thu Mar 6 13:11:44 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Commit point reached - logical record count 64
Commit point reached - logical record count 128
Commit point reached - logical record count 192
Commit point reached - logical record count 256
Commit point reached - logical record count 320
Commit point reached - logical record count 384
Commit point reached - logical record count 448
Commit point reached - logical record count 512
Commit point reached - logical record count 576
Commit point reached - logical record count 640
Commit point reached - logical record count 704
Commit point reached - logical record count 768
Commit point reached - logical record count 832
Commit point reached - logical record count 896
................
Commit point reached - logical record count 17270
Commit point reached - logical record count 17334
Commit point reached - logical record count 17398
Commit point reached - logical record count 17462
Commit point reached - logical record count 17526
Commit point reached - logical record count 17590
Commit point reached - logical record count 17634
[oracle@lunar dul]$

 

这里我们看到全部的17634 行数据都导入表中了。

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

DUL第二篇——使用DUL抽取dmp文件内容》有 2 条评论

  1. macleanliu 说:

    求女神试试ORACLE PRM

发表评论

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