`
sjk2013
  • 浏览: 2192677 次
文章分类
社区版块
存档分类
最新评论

Exporting and Importing Objects Using Oracle Data Pump(2.impdp)

 
阅读更多

1.导入表的DDL数据:

[lubinsu@localhost db_files]$ impdp lubinsu/lubinsu directory=dpump_dir01 dumpfile=lubinsu.dmp sqlfile=dpump_dir02:lubinsu.sql tables=latn_area_info

Import: Release 10.2.0.1.0 - Production on Thursday, 02 May, 2013 22:14:13

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

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "LUBINSU"."SYS_SQL_FILE_TABLE_01" successfully loaded/unloaded
Starting "LUBINSU"."SYS_SQL_FILE_TABLE_01":  lubinsu/******** directory=dpump_dir01 dumpfile=lubinsu.dmp sqlfile=dpump_dir02:lubinsu.sql tables=latn_area_info 
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "LUBINSU"."SYS_SQL_FILE_TABLE_01" successfully completed at 22:14:15

2.这样我们将latn_area_info的DDL信息都导入到了lubinsu.sql文件中,该文件放在目录对象dpump_dir02中
关于如何创建目录对象,请见上一篇文章:Exporting and Importing Objects Using Oracle Data Pump(1.expdp)

3.将表导入到其他用户下:
[lubinsu@localhost db_files]$ impdp scott/lubinsu directory=dpump_dir01 dumpfile=lubinsu.dmp tables=lubinsu.latn_area_info REMAP_SCHEMA=lubinsu:scott  

Import: Release 10.2.0.1.0 - Production on Thursday, 02 May, 2013 22:29:00

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

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "SCOTT"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "SCOTT"."SYS_IMPORT_TABLE_01":  scott/******** directory=dpump_dir01 dumpfile=lubinsu.dmp tables=lubinsu.latn_area_info REMAP_SCHEMA=lubinsu:scott 
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "SCOTT"."LATN_AREA_INFO"                    16.11 KB      14 rows
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SCOTT"."SYS_IMPORT_TABLE_01" successfully completed at 22:29:04

4.这里有个参数remap_table在10g中并没有这个参数,11g的数据泵中新增了该功能,但是1106上有bug无法使用

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics