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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Oracle Data Pump工具是Oracle数据库的一种高速、高效的数据转移工具,可以将数据从一个数据库导出到另一个数据库。下面是一些Oracle Data Pump工具的常见命令: 1. 导出数据库对象: ``` expdp username/password@database directory=dpump_dir_name dumpfile=export.dmp schemas=schema_name ``` 这个命令将会导出指定的数据库模式(schema)的所有对象,并将数据保存在“export.dmp”文件中。 2. 导出指定的数据库表: ``` expdp username/password@database directory=dpump_dir_name dumpfile=export.dmp tables=table_name ``` 这个命令将会导出指定的数据库表,并将数据保存在“export.dmp”文件中。 3. 导出指定的数据库表空间: ``` expdp username/password@database directory=dpump_dir_name dumpfile=export.dmp tablespaces=tablespace_name ``` 这个命令将会导出指定的数据库表空间,并将数据保存在“export.dmp”文件中。 4. 导入数据库对象: ``` impdp username/password@database directory=dpump_dir_name dumpfile=import.dmp schemas=schema_name ``` 这个命令将会将指定的数据文件中的数据库模式(schema)的所有对象导入到目标数据库中。 5. 导入指定的数据库表: ``` impdp username/password@database directory=dpump_dir_name dumpfile=import.dmp tables=table_name ``` 这个命令将会将指定的数据文件中的数据库表导入到目标数据库中。 6. 导入指定的数据库表空间: ``` impdp username/password@database directory=dpump_dir_name dumpfile=import.dmp tablespaces=tablespace_name ``` 这个命令将会将指定的数据文件中的数据库表空间导入到目标数据库中。 以上是一些Oracle Data Pump工具的常见命令,可以根据实际需要进行调整和修改。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值