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 -> Re: dbms_scheduler.purge_log not working

Re: dbms_scheduler.purge_log not working

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 22 Dec 2006 09:04:37 -0800
Message-ID: <1166807077.849936.5830@48g2000cwx.googlegroups.com>

On Dec 21, 12:50 pm, "Abhijit" <abhijit_bhatt..._at_hotmail.com> wrote:
> Mark,
> I didn't quite get what you tried to point out.
> dbms_scheduler.create_job doesn't set any value for parameter for
> start_date. So by default it is null. If it is null , then the job will
> get executed as soon as it is enabled.
> My issue was not with the job not getting executed. I can see that
> going into running state from Oracle Enterprise Manager. But I don't
> see any entries in user_scheduler_job_run_details after the run is
> over.
>
> - Abhijit
>
> On Dec 21, 8:19 am, "Mark D Powell" <Mark.Pow..._at_eds.com> wrote:
>
>
>
> > On Dec 21, 10:08 am, "Abhijit" <abhijit_bhatt..._at_hotmail.com> wrote:
>
> > > I am facing the problem of dbms_scheduler.purge_log not purging the old
> > > entries from user_scheduler_job_run_details. Can anybody please help me
> > > out?
>
> > > csdm_dev_at_CSDM>select count(*) from user_scheduler_job_run_details ;
>
> > > COUNT(*)
> > > ----------
> > > 26438
>
> > > csdm_dev_at_CSDM>exec dbms_scheduler.purge_log ;
>
> > > PL/SQL procedure successfully completed.
>
> > > csdm_dev_at_CSDM>select count(*) from user_scheduler_job_run_details;
>
> > > COUNT(*)
> > > ----------
> > > 26438
>
> > > csdm_dev_at_CSDM>
>
> > > Also I am noticing that for the jobs that I am trying to executing , I
> > > am not seeing any log entries. Here is the code that I am executing. I
> > > will appreciate any help. The job gets executed as I can see it via
> > > OEM.
>
> > > begin
> > > dbms_scheduler.create_job(job_name => 'long_sleep',
> > > job_type => 'PLSQL_BLOCK',
> > > job_action => 'begin
> > > dbms_lock.sleep(60);
> > > end;',
> > > auto_drop => FALSE);
> > > dbms_scheduler.set_attribute(
> > > name => 'long_sleep',
> > > attribute => 'LOGGING_LEVEL',
> > > value => DBMS_SCHEDULER.LOGGING_FULL
> > > );
> > > dbms_scheduler.enable('long_sleep');
> > > end;
> > > /
>
> > > csdm_dev_at_CSDM>select count(*) from user_scheduler_job_run_details where
> > > job_name
> > > = 'LONG_SLEEP';
>
> > > COUNT(*)
> > > ----------
> > > 0My 10g system is currently unavailable but I do not see an actual
> > schedule or any example of your executing the job in your post. You
> > should be able to find the last run date in dba_scheduler_jobs.
>
> > HTH -- Mark D Powell --- Hide quoted text -- Show quoted text -

Have you compared user_scheduler_job_run_details to dba_scheduler_job_run_details to see if the job shows there?

I am wondering if there is a problem with the view definition?

I searched metalink on the user view but none of the hits looked to be of interest to your problem. The dba view also produced a few hits but most of those are related to problems related to external programs execute via dbms_scheduler.

HTH -- Mark D Powell -- Received on Fri Dec 22 2006 - 11:04:37 CST

Original text of this message

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