Home » RDBMS Server » Server Administration » passing values and triggering an exe
passing values and triggering an exe [message #375049] Fri, 20 July 2001 08:16 Go to next message
John Walker
Messages: 2
Registered: July 2001
Junior Member
I need to know how to trigger either a dll or a exe from oracle based on a condition for example time (at 5:00 run app and pass given values) but im not sure how to go about it. Any help or direction would be a great help.
Re: passing values and triggering an exe [message #375050 is a reply to message #375049] Fri, 20 July 2001 08:47 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Use DBMS_JOB to schedule execution of procudures in Oracle. Passing values to is may be easiest done by storing them in a table and getting the proc to read the table. The whole thing is easier to do from a script which accesses the DB. You may not like this approach is you want to remain paltform independent.

Maybe something like this untested code...

DECLARE
job NUMBER;
BEGIN
DBMS_JOB.SUBMIT(job,'my_proc;',trunc(sysdate)+ 17/24,'sysdate+17/24');
DBMS_OUTPUT.put_line('Your job # is '||to_char(job));
commit;
END;
/

select job, priv_user, to_char(last_date, 'dd-Mon hh24:mi'), to_char(next_date, 'dd-Mon hh24:mi') from dba_jobs;

begin
DBMS_JOB.REMOVE(123);
end;
/

-- Result should be > 0 !!
SELECT * FROM v$parameter
where name = 'job_queue_processes';

http://www.oracle.com/oramag/code/tips2001/021201.html

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:16212348050
Previous Topic: GETTING DESCRIPTION OF ALL VIEWS
Next Topic: Queries on partitioned table are sometimes slow
Goto Forum:
  


Current Time: Fri Jul 05 10:20:06 CDT 2024