Re: expdp using dbms_datapump

From: Nigel Thomas <nigel.cl.thomas_at_googlemail.com>
Date: Wed, 28 Jan 2009 08:34:29 +0000
Message-ID: <53258cd50901280034i35f9d94dkc75455977ed67eaf_at_mail.gmail.com>



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

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 28 2009 - 02:34:29 CST

Original text of this message