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

Home -> Community -> Usenet -> c.d.o.server -> trouble with dbms_job...

trouble with dbms_job...

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Tue, 30 Sep 2003 16:21:34 +0200
Message-ID: <blc3hf$9o2$1@news.fujitsu-siemens.com>


Hi!
I've got the following package:
#!/bin/sh
 sqlplus -S -L perfstat/perfstat <<-\EOF   create or replace package oadmin_dbstats authid current_user    is
   procedure oadmin_analyzedb;
   end;
/

   show errors;
  create or replace package body oadmin_dbstats    is
    procedure oadmin_analyzedb

     is
      JobId binary_integer :=NULL;
     begin
      dbms_stats.alter_database_tab_monitoring(monitoring=>TRUE);
      dbms_stats.gather_database_stats(options=>'GATHER AUTO');
      dbms_job.submit(job=>JobId,what=>'perfstat.oadmin_dbstats.oadmin_analyzedb;',next_date=>sysdate+(1/144));
      commit;
     end;

    end;
/

  show errors;
EOF Now, when I run perfstat.oadmin_dbstats.oadmin_dbstats as system, it executes and correctly schedules the job.
But when it's started from the job queue it doesn't create a new job, instead the old job gets rescheduled to the next minute, then the next 2 minutes, then the next 4 minutes, etc.

(9.2.0.4, RH)

Lots of Greetings!
Volker Received on Tue Sep 30 2003 - 09:21:34 CDT

Original text of this message

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