This discussion is archived
4 Replies Latest reply: Apr 6, 2013 5:13 PM by JB RSS

External Job Windows

811414 Newbie
Currently Being Moderated
I run this job on my windows install
BEGIN
-- Windows
DBMS_SCHEDULER.create_job(
job_name => 'win_command_job',
job_type => 'EXECUTABLE',
number_of_arguments => 3,
job_action => 'C:\windows\system32\cmd.exe',
auto_drop => FALSE,
enabled => FALSE);

DBMS_SCHEDULER.set_job_argument_value('win_command_job',1,'/c');
DBMS_SCHEDULER.set_job_argument_value('win_command_job',2,'mkdir');
DBMS_SCHEDULER.set_job_argument_value('win_command_job',3,'C:\TEMP\test_dir');
DBMS_SCHEDULER.set_attribute('win_command_job', 'credential_name', 'MY_CRED');
DBMS_SCHEDULER.enable('win_command_job');
END;
/

First time it runs it is successful, I run it a second time changing the directory name and it fails. I determined that I can create a new user account with administrators rights and the job works only the first time, but then every subsequent run it fails. It seems to be related to the credentials.

Edited by: 808411 on Mar 14, 2013 4:22 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points