Re: How to determine if a stored procedure is used (executed) in the database?

  • From: Chris Gait <zhouyi235@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 10 Nov 2005 11:18:05 -0500

You could look for it in the shared pool using the V$DB_OBJECT_CACHE
view. You could automate the process using a job or a system trigger
(to fire whenever it is run), but if it's just a matter of it being
frequently used checking a few times a day for it in V$DB_OBJECT_CACHE
using a job that writes to a table would probably be enough.

Regards,
Chris Gait

2005/11/10, Maimon Oded <oded.maimon@xxxxxxxxx>:
> i think this is a bit dangerous..
> invalidating code can invalidate lot more things.. and create latches when
> trying to compile, and locks..
>
> Oded.
>
>
>
> On 11/10/05, malcolm arnold <malcolmarnold@xxxxxxxxx> wrote:
> > > For index we can monitor the index and find out if it's been used.
> > >
> > > Other than adding custom code to the stored procedure to track it's
> > > execution, is there any other way to do it without modifying it?
> >
> > You can make it invalid.  If someone executes it, Oracle will
> > automatically recompile it, turning it valid.  If it stays invalid,
> > no-one has executed it...
> >
> > Malcolm.
> > --
> > //www.freelists.org/webpage/oracle-l
> >
> >
> >
>
>
--
//www.freelists.org/webpage/oracle-l


Other related posts: