Re: expdp using dbms_datapump

  • From: Nigel Thomas <nigel.cl.thomas@xxxxxxxxxxxxxx>
  • To: ksmadduri@xxxxxxxxx, ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 28 Jan 2009 08:34:29 +0000

Kumar

I think you are really trying to filter metadata (what tables to export)
rather than data (what data to export from a particular table).

Here is a similar example (from a recent OTN forum
post<http://forums.oracle.com/forums/thread.jspa?forumID=61&threadID=846857>,
where the formatting should be clearer):


declare

handle number;

state varchar2(20);

begin

handle := dbms_datapump.open

(operation=>'EXPORT'

,job_mode=>'TABLE'

);

dbms_datapump.add_file(

handle => handle,

filename => 'test.dmp',

directory => 'TEST_DIR'

);

dbms_datapump.metadata_filter

(handle=>handle

,name=>'NAME_EXPR'

,value=>'IN (SELECT TABLE_NAME FROM USER_TABLES WHERE TABLE_NAME LIKE
''P%'')'

);

dbms_datapump.start_job(handle=>handle);

dbms_datapump.wait_for_job(handle=>handle, job_state=>state);

dbms_output.put_line('State='||state);

end;

/
Regards Nigel

Other related posts: