Hi All,
We are using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Operating System is: Windows Server 2003 Standard Edition, Service Pack 2
We have created following procedure in database:
{code}
CREATE OR REPLACE PROCEDURE "CREATE_BACKUP_FULL" IS
handle number;
file_name_dmp VARCHAR2(500):='FULL_'||ora_database_name||'_'||to_char(sysdate, 'DY_DD-MON-YYYY_HH24_MI')||'.DMP';
file_name_log VARCHAR2(500):='FULL_'||ora_database_name||'_'||to_char(sysdate, 'DY_DD-MON-YYYY_HH24_MI')||'.LOG';
BEGIN
---- Create backup Job
handle := dbms_datapump.open('EXPORT','FULL');
dbms_datapump.add_file(handle,file_name_dmp,'DMP2');
dbms_datapump.add_file(handle,file_name_log,'DMP2',filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
END;
{/code}
After that we have created a database job, and call this job thru database schedules. There are two databases, from one database job executes and generate the export dump file in the mentioned directory "DMP2", while from other database we are receiving the error: "ORA-39012: Client detached before the job started".
Both the databases are on same server, and the schema owners of both databases have same DB privileges, but from one the dump files are generating and from other db it fails, while the job log in database shows the status as SUCCESSFUL.
Kindly advice