Oracle datapump的确不错

本文记录一次使用datapump的过程,以后再好好研究一下。

第一步:expdp VS exp

[oracle@sharedb dump]$ time expdp nhshare/nhshare tables=KZ_CARDCENTER_FAKADATA directory=mydir dumpfile=KZ_CARDCENTER_FAKADATA.expdp

Export: Release 10.2.0.2.0 - 64bit Production on Monday, 21 December, 2009 15:22:20

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning and Data Mining options
Starting "NHSHARE"."SYS_EXPORT_TABLE_01":  nhshare/******** tables=KZ_CARDCENTER_FAKADATA directory=mydir dumpfile=KZ_CARDCENTER_FAKADATA.expdp 
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 536 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "NHSHARE"."KZ_CARDCENTER_FAKADATA"          454.0 MB 1105331 rows
Master table "NHSHARE"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for NHSHARE.SYS_EXPORT_TABLE_01 is:
  /tmp/dump/KZ_CARDCENTER_FAKADATA.expdp
Job "NHSHARE"."SYS_EXPORT_TABLE_01" successfully completed at 15:22:29


real    0m14.860s
user    0m0.015s
sys     0m0.011s
[oracle@sharedb dump]$ time exp   nhshare/nhshare tables=KZ_CARDCENTER_FAKADATA file=/tmp/dump/KZ_CARDCENTER_FAKADATA.exp

Export: Release 10.2.0.2.0 - Production on Mon Dec 21 15:22:45 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning and Data Mining options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table         KZ_CARDCENTER_FAKADATA    1105331 rows exported
Export terminated successfully without warnings.

real    1m24.271s
user    1m3.371s
sys     0m3.875s

第二步:expdp 文件大小 VS exp 文件大小

[oracle@sharedb dump]$ ls -lth 
总用量 1.1G
-rw-r--r--  1 oracle dba 669M 12月 21 15:24 KZ_CARDCENTER_FAKADATA.exp
-rw-r--r--  1 oracle dba 1.1K 12月 21 15:22 export.log
-rw-r-----  1 oracle dba 455M 12月 21 15:22 KZ_CARDCENTER_FAKADATA.expdp

第三步:impdp VS imp

[oracle@mailserver ~]$ time impdp ipwarehouse/ipwarehouse DIRECTORY=mydir dumpfile=KZ_CARDCENTER_FAKADATA.expdp remap_schema=nhshare:ipwarehouse REMAP_TABLESPACE=SHAREDB:ipwarehouse 

Import: Release 10.2.0.1.0 - 64bit Production on Monday, 21 December, 2009 16:45:54

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Master table "IPWAREHOUSE"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "IPWAREHOUSE"."SYS_IMPORT_FULL_01":  ipwarehouse/******** DIRECTORY=mydir dumpfile=KZ_CARDCENTER_FAKADATA.expdp remap_schema=nhshare:ipwarehouse REMAP_TABLESPACE=SHAREDB:ipwarehouse 
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "IPWAREHOUSE"."KZ_CARDCENTER_FAKADATA"      454.0 MB 1105331 rows
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "IPWAREHOUSE"."SYS_IMPORT_FULL_01" successfully completed at 16:50:37


real    5m14.025s
user    0m0.017s
sys     0m0.014s
[oracle@mailserver ~]$ time imp   ipwarehouse/ipwarehouse file=/tmp/dump/KZ_CARDCENTER_FAKADATA.exp fromuser=nhshare touser=ipwarehouse 

Import: Release 10.2.0.1.0 - Production on Mon Dec 21 16:53:05 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

Export file created by EXPORT:V10.02.01 via conventional path

Warning: the objects were exported by NHSHARE, not by you

import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. importing NHSHARE's objects into IPWAREHOUSE
. . importing table       "KZ_CARDCENTER_FAKADATA"    1105331 rows imported
Import terminated successfully without warnings.

real    9m9.242s
user    0m58.769s
sys     0m3.508s
posted @ 2009-12-21 17:21  killkill  阅读(1267)  评论(0编辑  收藏  举报