Question

I am kind of new in DMBS_SCHEDULER and I face some problems.
I want to run an .exe
So I created a Job:

begin
   sys.dbms_scheduler.create_job(job_name            => 'FTREC.EXE_1',
                            job_type            => 'EXECUTABLE',
                            job_action          => 'C:\Windows\System32\calc.exe',
                            start_date          => to_date(null),
                            repeat_interval     => '',
                            end_date            => to_date(null),
                            job_class           => 'IRECS_JOB_CLASS',
                            enabled             => false,
                            auto_drop           => false,
                            comments            => '');
end;

I have also created credentials :

DBMS_SCHEDULER.CREATE_CREDENTIAL('WWLSERVER','WWLSERVER','1234',null,null,null);

And I applied the credentials to my job

dbms_scheduler.set_attribute('FTREC.EXE_1', 'credential_name', 'WWLSERVER');

But when I try to run my Job I get this error:

EXTERNAL_LOG_ID="job_255737_183883",
ORA-27369: job of type EXECUTABLE failed with exit code: The extended attributes are inconsistent.

What I am doing wrong?

Was it helpful?

Solution

Credentials were not available in 10g. There are no mentions of the word "credential" in the DBMS_SCHEDULER documentation.

I was able to run your code in 12c. But running calc.exe created an un-killable session, I had to restart the database. Things went much better when I used a simple .bat file for testing.

This thread on the Oracle Forums has methods for running an external program on 10g.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top