Help - Search - Members - Calendar
Full Version: problems with data pump
Oracle DBA Forums > Oracle > Oracle Forum
aquilon
i've made de procedure:

create or replace procedure export_user is
l_dp_handle NUMBER;
l_last_job_state VARCHAR2(30) := 'UNDEFINED';
l_job_state VARCHAR2(30) := 'UNDEFINED';
l_sts KU$_STATUS;
begin
l_dp_handle := DBMS_DATAPUMP.open(
operation => 'EXPORT',
job_mode => 'SCHEMA',
remote_link => NULL,
job_name => 'EMP',
version => 'LATEST');

DBMS_DATAPUMP.add_file(
handle => l_dp_handle,
filename => 'XXX.dmp',
directory => 'DUMP_DIR');

DBMS_DATAPUMP.add_file(
handle => l_dp_handle,
filename => 'cros.log',
directory => 'LOG_DIR',
filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);

DBMS_DATAPUMP.metadata_filter(
handle => l_dp_handle,
name => 'SCHEMA_EXPR',
value => '= ''SCHEMA_NAME''');

DBMS_DATAPUMP.start_job(l_dp_handle);

DBMS_DATAPUMP.detach(l_dp_handle);
end export_user;


and a i've made the a job with oem scheduler that is called EXPORT_SCHEMA_NAME. but the problem is that i'm getting the : ORA-31626: job does not exist.

Please any one has an ideea?

what i'm dooing wrong.
Littlewheat
Hi aquilon,
it's suitable insert some PL/SQL code between start_job and detach.
(for check job status)

http://download.oracle.com/docs/cd/B19306_...i.htm#sthref460

U preferably try access to job, which do not exist.

dp_handle := dbms_datapump.attach('EMP');

- check if you exist ( job_name 'EMP')
select * from v$session where action = 'EMP'
or
select * from dba_datapump_jobs where job_name='EMP'
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.