点睛图 > GDUL > 产品特性

GDUL产品特性

完整支持多种导出格式

GDUL支持EXPDP, EXP, TEXT和DB导出格式,示例如下:

1. EXPDP格式(10.1兼容性)


1) 更改gdul.ini中的导出格式为EXPDP
<export_format> EXPDP </export_format>

2) 导出
GDUL> unload table andy.t_big_table
2016-12-06 15:28:04 unloading table "ANDY"."T_BIG_TABLE"...
2016-12-06 15:28:25 unloaded 8099838 rows.

3) 导入
$impdp andy/andy directory=GDUL_DIR tables=t_big_table dumpfile=ANDY_T_BIG_TABLE.dmp remap_schema=andy:andy2 table_exists_action=truncate
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "ANDY2"."T_BIG_TABLE" 714.5 MB 8099838 rows
Job "ANDY"."SYS_IMPORT_TABLE_13" successfully completed

2. EXP格式(8.1.6兼容性)


1) 更改gdul.ini中的导出格式为EXP
<export_format> EXP </export_format>

2) 导出
GDUL> unload table andy.t_big_table
2016-12-06 15:44:37 unloading table "ANDY"."T_BIG_TABLE"...
2016-12-06 15:45:00 unloaded 8099838 rows.

3) 导入
$export NLS_LANG=.UTF8
$imp andy/andy TABLES=t_big_table file=/home/andy/gdul/dump/ANDY_T_BIG_TABLE.dmp FROMUSER=andy TOUSER=andy2 ignore=y
...
Export file created by EXPORT:V08.01.07 via conventional path
import done in UTF8 character set and AL16UTF16 NCHAR character set
. importing ANDY's objects into ANDY2
. . importing table "T_BIG_TABLE"
8099838 rows imported
Import terminated successfully without warnings.

3. TEXT(SQLLDR)


1) 更改gdul.ini中的导出格式为TEXT
<export_format> SQLLDR </export_format>

2) 导出
GDUL> unload table andy.t_big_table
2016-12-06 18:20:47 unloading table "ANDY"."T_BIG_TABLE"...
2016-12-06 18:21:26 unloaded 8099838 rows.

3) 导入
$export NLS_LANG=.UTF8
$cd /home/andy/gdul/dump
$sqlldr userid=andy/andy control=ANDY_T_BIG_TABLE.ctl
SQL*Loader: Release 11.2.0.3.0
Save data point reached - logical record count 100000.
Save data point reached - logical record count 200000.
..
Save data point reached - logical record count 8000000.
Load completed - logical record count 8099838.

4. DB


1) 更改gdul.ini中的导出格式为DB
<export_format> DB </export_format>
<db_conn> username/password@ip:port/service_name </db_conn>

2) 导出到数据库
GDUL> unload table andy.t_big_table
2016-12-06 18:20:47 unloading table "ANDY"."T_BIG_TABLE"...
2016-12-06 18:21:26 unloaded 8099838 rows.

3) 目标库查看
select * from andy.t_big_table where rownum < 100;