Skip to Main Content
  • Questions
  • exclude a table from an Oracle export?

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, RALF.

Asked: July 31, 2012 - 5:11 am UTC

Last updated: July 31, 2012 - 1:22 pm UTC

Version: 10g

Viewed 10K+ times! This question is

You Asked

Is it possible to exclude a table from an Oracle export?
 
I have batches that start at the application level and one of them, there is an export that is achieved.
 
The command line launched by the script to export is:
exp system / xxx owner =%% i%% file = exp i.dmp compress = no direct = y = y consist statistics = none log = exp%% i_log.log)

I want to exclude the table 'Nice_G' of this export.

and Tom said...

using datapump, yes, easily.

http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#i1007829

using exp - no, not really. You could put in place a VPD (virtual private database) policy that makes it so that the user exporting the data cannot see any rows in the table, the table definition would be exported but not the data itself.



Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

RALF Davide, August 01, 2012 - 3:53 am UTC

Thank you so much Thomas, and sorry about quality of my comment. I will consider these comments in the next instructions;
THANKS A LOT.

how to exclude tables or get the table set you want from EXP

Jeanne Hiesel, March 18, 2014 - 3:25 pm UTC

Please let your users know that
you can also build a "QUERY" clause into the parameter set.

e.g.
exp usr/pwd GRANTS=Y FILE=exportSample.dmp LOG=exportSample.log QUERY=\"WHERE job=\'SALESMAN\' and sal \<1600\"

If you can generate a query that gives you the list of tables that you want then the query parameter is the tool.

More to Explore

Data Pump

All of the database utilities including Data Pump are explained in the Utilities guide.