Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Execute a .exe file with pl/sql

1053508Nov 9 2013

Hi everyone. I'm logged in as sys and want to do as description says

This is my code:

begin

dbms_scheduler.create_job('myjob',

   job_action=>'C:\WINDOWS\SYSTEM32\CMD.EXE',

   number_of_arguments=>4,

   job_type=>'executable', enabled=>false, auto_drop =>FALSE);

dbms_scheduler.set_job_argument_value('myjob',1,'cd..');

dbms_scheduler.set_job_argument_value('myjob',2,'cd..');

dbms_scheduler.set_job_argument_value('myjob',3,'cd \Program Files (x86)\Something\');

dbms_scheduler.set_job_argument_value('myjob',4,'this.exe');

dbms_scheduler.enable('myjob');

end;

/

exec dbms_scheduler.run_job('myjob');

I think it should execute this.exe by opening the program but it just prompts me: "PL/SQL procedure successfully completed."

I also tried with this:

begin

dbms_scheduler.create_job('myjob',

   job_action=>'C:\Program Files (x86)\Something\this.exe',

   job_type=>'executable', enabled=>false, auto_drop =>FALSE);

dbms_scheduler.enable('myjob');

end;

/

exec dbms_scheduler.run_job('myjob');

But it seems there is a problem with the attributes:"ORA-27369: job of type EXECUTABLE failed with exit code: The extended

attributes are inconsistent."

this.exe is a double-click program
I wanted to do this PL/SQL so I can move on executing C program where I give it one attribute (a number)

Thanks in advance. 

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2013
Added on Nov 9 2013
0 comments
1,419 views