Hi, I'm trying to do a data pump export for metadata on a tablespace (COURSE). Am I on the right track? My data pump directory was created as:
CREATE DIRECTORY dpump_dir AS '/mydata/data';
Please keep in mind that I'm a beginner. This may or may not be the best way to go about this, but I'd like to try to get this working. Thanks very much.
declare
dp_handle number;
begin
dp_handle := dbms_datapump.open(
operation => 'EXPORT',
job_mode => 'TABLESPACE');
dbms_datapump.add_file(
handle => dp_handle,
filename => 'courses.dmp',
directory => 'dpump_dir');
dbms_datapump.add_file(
handle => dp_handle,
filename => 'courses.log',
directory => 'dpump_dir',
filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
dbms_datapump.metadata_filter(
handle => dp_handle,
name => 'TABLESPACE_EXPR',
value => '''COURSE''');
dbms_datapump.start_job(dp_handle);
dbms_datapump.detach(dp_handle);
end;
/
ERROR at line 1:
ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 2926
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3162
ORA-06512: at line 8