Metadata_filter

  • From: Joe Smith <joe_dba@xxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 26 Jan 2011 12:41:38 -0600

h1 := DBMS_DATAPUMP.OPEN(operation => 'EXPORT', job_mode => 'TABLE', NULL, 
'Scott table export','LATEST'); 
 
                -- Specify a single dump file for the job (using the handle 
just returned)
                -- and a directory object, which must already be defined and 
accessible
                -- to the user running this procedure.
 
DBMS_DATAPUMP.ADD_FILE(handle => h1, filename => 
'scott_table_exp_'||dt||'.dmp', directory => 'DATA_PUMP_DIR', filetype => 
dbms_datapump.KU$_FILE_TYPE_DUMP_FILE);
DBMS_DATAPUMP.ADD_FILE(handle => h1, filename => 
'scott_table_exp_'||dt||'.log', directory => 'DATA_PUMP_DIR', filetype => 
dbms_datapump.KU$_FILE_TYPE_LOG_FILE);
 
 
                -- A metadata filter is used to specify the schema that will be 
exported.
 
DBMS_DATAPUMP.SET_PARAMETER (handle => h1, 'INCLUDE_METADATA', 1);
 
 
-- A metadata filter is used to specify the schema that will be exported.
DBMS_DATAPUMP.METADATA_FILTER(handle => h1, name => 'NAME_EXPR IN (''EMP'')'); 
 
 
 
If I want to export a single table from a user how do I write the 
metadata_filter line?
 
I want to export scott.emp.

Thanks
                                          

Other related posts: