Solved

ORACLE JOB

Posted on 2013-12-18
7
494 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
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.

730 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