Running a Job

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
      Job_Num INTEGER;
                  'log_proc12;', SYSDATE,
                  'SYSDATE + (10/(24*60*60))');
      DBMS_Output.put_line('Job Number = '||To_char(Job_Num));
            When others then

Who is Participating?
meowshConnect With a Mentor Commented:
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

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.