Solved

ORACLE JOB

Posted on 2013-12-18
7
493 Views
Last Modified: 2013-12-18
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
Comment
Question by:andrejaTJ
  • 4
  • 2
7 Comments
 
LVL 13

Expert Comment

by:Alexander Eßer [Alex140181]
ID: 39726102
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
 

Author Comment

by:andrejaTJ
ID: 39726133
Thank you Alex,
I'm getting error:

[Err] ORA-01008: not all variables bound

This is not creating job :(
Best,
Andreja
0
 
LVL 13

Accepted Solution

by:
Alexander Eßer [Alex140181] earned 200 total points
ID: 39726252
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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 13

Expert Comment

by:Alexander Eßer [Alex140181]
ID: 39726449
Thanks for accepting my comment as the solutions, BUT why do I get that "B" penalty?!
0
 

Author Comment

by:andrejaTJ
ID: 39726481
Sorry...
How I can change the grade?!
Best,
0
 
LVL 13

Expert Comment

by:Alexander Eßer [Alex140181]
ID: 39726503
Thanks a lot ;-)

Cheers,
Alex
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question