任何人都可以帮助我的数据泵导出。我尝试了很多组合。但是,我总是得到:
ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4932
ORA-06512: at "SYS.DBMS_DATAPUMP", line 5768
ORA-06512: at line 38
对此有何建议?
CREATE TABLE foo
(
bar VARCHAR2(10)
);
INSERT INTO FOO VALUES('hello');
INSERT INTO FOO VALUES('world');
COMMIT;
create or replace package pkg
is
function tst(p_val varchar2) return varchar2;
end pkg;
/
create or replace package body pkg
as
function tst(p_val varchar2) return varchar2 is
begin
return p_val;
end;
end pkg;
/
DECLARE
h1 NUMBER;
l_status varchar2(200);
BEGIN
h1 := DBMS_DATAPUMP.OPEN(
operation => 'EXPORT',
job_mode => 'TABLE',
remote_link => NULL,
job_name => 'exp_1',
version => 'LATEST'
);
DBMS_DATAPUMP.ADD_FILE(
handle => h1,
filename => 'export.dmp',
reusefile => 1,
directory => 'DBOUT',
filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE);
DBMS_DATAPUMP.ADD_FILE(
handle => h1,
filename => 'export.log',
reusefile => 1,
directory => 'DBOUT',
filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE
);
DBMS_DATAPUMP.METADATA_FILTER(
handle => h1,
name => 'NAME_EXPR',
value => 'IN (SELECT table_name FROM user_tables WHERE table_name LIKE ''FOO%'')',
object_type => 'TABLE'
);
DBMS_DATAPUMP.DATA_REMAP(
handle => h1,
name => 'COLUMN_FUNCTION',
table_name => 'FOO',
column => 'BAR',
function => 'pkg.tst'
);
DBMS_DATAPUMP.start_job(h1);
DBMS_DATAPUMP.wait_for_job(h1, l_status);
dbms_output.put_line( l_status );
END;
/
关于文档,它应该可以工作。不?
任何建议都非常受欢迎,
问候,