文件对象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法无应用

文章结束给大家分享下程序员的一些笑话语录: Bphone之你们聊,我先走了!移动说:我在phone前加o,我叫o缝;苹果说:我在phone前i,我是i缝;微软说:我在phone前加w,我叫w缝;三星说:你们聊,我先走了!
将来王建宙写回忆录的时候,一定要有一句“常小兵为中国移动的发展做出了不可磨灭的贡献”。

你可能感兴趣的:(oracle)