03-05-2012
3,
0
Join Date: Oct 2009
Last Activity: 14 June 2012, 12:49 PM EDT
Posts: 3
Thanks Given: 0
Thanked 0 Times in 0 Posts
It would be easier for me just to point you to the documentation but I don't have enough posts to stick a URL in here...
Basically for what you want to accomplish it would be easier for you to create a parameter file and use the QUERY keyword to filter the data. You will also need to create a directory object within Oracle (which requires the CREATE ANY DIRECTORY privilege or a role allowing you to do it) and grant read,write to the user doing the export. So...
SQL> create or replace directory exp_dir as '<path to directory>';
SQL> grant read,write on directory expdir to test_man; --assuming this user didn't create it
The contents of the parameter file would look something like this (you can call it whatever you want):
TABLES=test_man.test_tbl,test_man.test_tbl_02 -- comma separated list of tables
DUMPFILE=test_dmp.dmp
QUERY=test_man.test_tbl:"WHERE T_ROW1 >1",test_man.test_tbl_02:"WHERE owner !='SYS'" -- table_name:"WHERE CLAUSE",table_name:"WHERE CLAUSE",...
Whatever user you use to call the data pump export will need create table permissions as the data pump job needs to create a temp master table.
To execute from the command line you would do:
testuser@test>expdp username/password directory=exp_dir parfile=<path to paramter file>
Hope this helps. Let me know if you need some clarification.