Monday, September 10, 2012

Export selective 1000 tables using expdp, include clause

We had discrepancy in PeopleSoft DDDAUDIT. Around 1200 tables were there in the database
but not in the  Application.

We had to drop them ,but had to take a backup of those tables.

Using Data Pump and putting all those 1200 tables in the TABLES= list was a giving me value too large error.

So to resolve

1. Created a table "LIST_OF_TBL' with one column "TNAME"
2. Inserted those 1200 tables names in the above table(step 1 above)
3. created a par file as below

DIRECTORY=dv_exp1
DUMPFILE=dv_exp1.dmp
LOGFILE=dv_exp1.log
INCLUDE=TABLE:"IN (select tname from list_of_tbl)"

That's it , 
expdp sysadm/sysadm parfile=exp1.par

No comments: