Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Running a Job

Posted on 1999-07-26
1
Medium Priority
?
843 Views
Last Modified: 2008-02-01
I am unable to run a job based on a simple example given by oracle PL/SQL programming book.  My DBscripts are as follows; It need to activate a procedure "log_proc12" which only insert the sysdate into a field.  There is no problem with my prcedure as it works by itself.  I can desc the job, but it' don't call by itself.  Could it be the JOB_QUEUE_PROCESS is set to zero?  Can showone tell me where the file INIT.ORA is usually located in the UNIX machine if that is the cause.  Thanks


Set Serveroutput on
Declare
      Job_Num INTEGER;
Begin
      DBMS_JOB.SUBMIT(
                  Job_Num,
                  'log_proc12;', SYSDATE,
                  'SYSDATE + (10/(24*60*60))');
      DBMS_Output.put_line('Job Number = '||To_char(Job_Num));
      Exception
            When others then
                  DBMS_Output.put_line(SQLERRM);
End;
/

0
Comment
Question by:ycgoh
[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
1 Comment
 
LVL 3

Accepted Solution

by:
meowsh earned 30 total points
ID: 1087764
Hello ycgoh

I think you are correct when you say that you need JOB_QUEUE_PROCESS set to something other than zero.

The SNP background process(es) execute job queues such as those established by DBMS_JOB.SUBMIT. SNP processes periodically wake up and execute any queued jobs that are due to be run. You must have at least one SNP process running to execute your queued jobs in the background.

You control whether or not SNP processes are running by parameter in your initSID.ora file.  The parameters you need are JOB_QUEUE_PROCESSES (number of processes running) and the JOB_QUEUE_INTERVAL (controls the frequency of the SNP process and uses seconds as the unit).

I am not sure where the init<SID>.ora files are usually held under Unix.  I suppose it depends largely on where you Unix Administrator wants them put.  Try $ORACLE_HOME to start with.  If not try a 'find' command at the root directory.

Hope this is the sort of info you need

Meowsh
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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.

660 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