Home » SQL & PL/SQL » SQL & PL/SQL » Problem of a Student with DBMS_JOB.
Problem of a Student with DBMS_JOB. [message #39020] Fri, 07 June 2002 03:05 Go to next message
Chandra Sekhar
Messages: 4
Registered: April 2002
Junior Member
I am a Final Year Computer Science student doing Oracle8.1.6 under Windows2000 Server.I want to get a procedure executed everyminute.

This procedure will Insert 'Hello Kunal' into the table
TESTJOB with only one column of type Varchar2.

My procedure is:

SQL>Create or Replace procedure myname as
Begin
Insert into TESTJOB values ('HELLO KUNAL');
End;
/
SQL> Procedure Created Successfully.

Then I am submitting the Job.

SQL>Variable job number
SQL>begin
dbms_job.submit(:job,'myname;',sysdate,'sysdate+1/1440');
commit;
end;
/
SQL>Procedure Created Successfully.

Now the Problem arises.it is not getting executed automatically.
So I tried invoking the procedure manually

SQL>EXEC DBMS_JOB.RUN(4)
/*Job Number is 4 in User_jobs.

Then Only once the Procedure is getting executed.

The Procedure is not getting executed automatically at all.

I checked User_Jobs.
It holds the Job with Job,Last_Date,.....etc.
I checked DBA_Jobs.
It also holds the correct Data.

Then I checked DBA_JOBS_RUNNING.************Here is the Problem****************

This View says 'NO ROWS SELECTED'.

I have seen the Init.Ora Parameters.
In this file
job_queue_processes = 2
job_queue_interval = 10
job_queue_keep_connections = false

I changed the Job Queue Processes to 3
I again Restarted the Database and submitted my JOb.
It is not working this time too.
Anybody kinldy Help me how to come out find a solution.

Why is my DBA_JOBS_RUNNING empty?
Why my job is not getting into this view?
Re: Problem of a Student with DBMS_JOB. [message #39024 is a reply to message #39020] Fri, 07 June 2002 04:32 Go to previous messageGo to next message
Rick Cale
Messages: 111
Registered: February 2002
Senior Member
Everything looks Ok. I ran your setup and it worked ok.
I did not see anything in dba_jobs_running. Probably
because the job runs so quickly the record does not
stay in that long. I think that table only contains
records for only the jobs currently running not submitted.
Re: Problem of a Student with DBMS_JOB. [message #39933 is a reply to message #39020] Sun, 25 August 2002 23:42 Go to previous message
Arvind
Messages: 23
Registered: December 2001
Junior Member
Hi,

Do let me know if you are able to solve this problem.. i am facing a similar problem as well.. and looking at all possible solns.

regds,

arvind
Previous Topic: Execute statements after every 'Enter'
Next Topic: optimisation of query
Goto Forum:
  


Current Time: Fri Apr 19 23:54:34 CDT 2024