Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 504
  • Last Modified:

ORACLE JOB

Hi,
I created Stored Procedure that need to run every 15 minutes.
I tested with SQL, works fine...
begin
update_sad_header('BG','TR');
end;

I tested as well: update_sad_header('KG','AF'); and works fine...
Can someone help me to create JOB with those two parameters (arguments)?

Thank you
0
andrejaTJ
Asked:
andrejaTJ
  • 4
  • 2
1 Solution
 
Alexander Eßer [Alex140181]Software DeveloperCommented:
classic DBMS_JOB would look like this:

begin
  sys.dbms_job.submit(job => :job,
                      what => 'update_sad_header(''KG'',''AF'');',
                      next_date => sysdate,
                      interval => 'sysdate + 15/1440');
  commit;
end;

Open in new window


This starts the job immediately.
0
 
andrejaTJAuthor Commented:
Thank you Alex,
I'm getting error:

[Err] ORA-01008: not all variables bound

This is not creating job :(
Best,
Andreja
0
 
Alexander Eßer [Alex140181]Software DeveloperCommented:
Sorry, my bad ;-)

declare
l_job binary_integer;
begin
  sys.dbms_job.submit(job => l_job,
                      what => 'update_sad_header(''KG'',''AF'');',
                      next_date => sysdate,
                      interval => 'sysdate + 15/1440');
  commit;
end;

Open in new window

0
The Lifecycle Approach to Managing Security Policy

Managing application connectivity and security policies can be achieved more effectively when following a framework that automates repeatable processes and ensures that the right activities are performed in the right order.

 
Alexander Eßer [Alex140181]Software DeveloperCommented:
Thanks for accepting my comment as the solutions, BUT why do I get that "B" penalty?!
0
 
andrejaTJAuthor Commented:
Sorry...
How I can change the grade?!
Best,
0
 
Alexander Eßer [Alex140181]Software DeveloperCommented:
Thanks a lot ;-)

Cheers,
Alex
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now