Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

export schema excluding data of some tables,but including metadata of those tables .

hesaraJun 13 2018 — edited Jun 14 2018

I have a schema in oracle11gR2 having many tables. Two of them are very large. I want to export this schema  only without the data of those 2 large tables.

( I want the table structure and all other metadata relating to those large tables)

Currently I do this as seperate 2 exports.

First i export the schema exculding those 2 large tables.

Then i export those large 2 tables through exp utility with rows=no clause as follows.

expdp userid="'/ as sysdba'" DUMPFILE=expdp_file.dmp SCHEMAS=SCOTT EXCLUDE=TABLE:\"IN \(\'FA_OP_PRO_DEPOSIT_BK\',\'FA_OP_PRO_DEPOSIT_DETAILS_BK\'\)\" DIRECTORY=DATA_PUMP_DIR logfile=expdp_SCOTT_080618.log

exp file=exp_SCOTT_meta_080618.dmp statistics=none tables=SCOTT.FA_OP_PRO_DEPOSIT_BK,SCOTT.FA_OP_PRO_DEPOSIT_DETAILS_BK rows=no log=exp_SCOTT_meta_080618.log

impdp userid="'/as sysdba'" dumpfile=expdp_file.dmp schemas=SCOTT DIRECTORY=DATA_PUMP_DIR logfile=impdp_SCOTT_080618.log

imp file=exp_SCOTT_meta_080618.dmp fromuser=SCOTT touser=SCOTT log=imp_SCOTT_meta_080618.log

My question is that, can i do that from a single exp or expdp query.

This post has been answered by unknown-3431574 on Jun 13 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2018
Added on Jun 13 2018
10 comments
4,456 views