oracle-databaseimportimpdp

Importing selective data using impdp


I have an entire DB to be imported as a dump into my own. I want to exclude data out of certain tables(mostly because they are huge in size and not useful). I cannot entirely exclude those tables since I need the table object per se(minus the data) and will have to re create them in my schema if I do so. Also in the absence of those table objects , various other foreign constraints defined on other tables will also fail to be imported and will need to be redefined.So I need to exclude just the data from certain tables.I want data from all other tables though.

Is there a set of parameters for impdp that can help me do so?


Solution

  • Definitely make 2 runs. One to create all the table objects, but instead of using tables in the second impdp run, use the exclude

    impdp ... Content=data_only exclude=TABLE:"IN ('table1', 'table2')"
    

    The other way works, but this way you only have to list the tables you don't want versus all that you want.