Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: getting job number of queued job

Re: getting job number of queued job

From: ParrisG <parrisg_at_aol.com>
Date: 1998/03/14
Message-ID: <19980314151101.KAA02632@ladder03.news.aol.com>#1/1

The reason I don't use sessionid currently is because it's 0.

My approach is this: From a developer 2000 forms application, I want to submit a database procedure for execution and immediately return control back to the application. I need to use the dbms_job package to do this. The dbms_job pacakge is not available from the client side, so I created a database procedure that I can call from the client. This procedure has access to the dbms_job package - because it's on the server. I pass the name of the job I want executed as a parameter to this procedure. The procedure, in turn, passes the procedure name as a parameter to the dbms_job.submit procedure. When the running process executes the userenv function on the sessionid, it returns 0 - I presume this is because there is no controlling user session. I really only have the name of the process - in user_jobs - for tracking purposes. If there is more than one instance of this procedure, I can't tell which is which.

The running process writes to an execution status table, which a user can access to determine how far along the job has come. It would be nice to query this table by job number. Unfortunately the procedure that populates the status table was written some time ago and is embedded in many programs - I would like to change this procedure so that it can obtain the job number from the environment, and not from a parameter - in which case I would have to change a lot of code. Received on Sat Mar 14 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US