Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to determine if a stored procedure is used (executed) in the database?
The first step is to check dependancies to see if it's referenced by
any other object. If yes than you first investigate this depndency and
question of usage is somewhat the secondary until you remove this
dependency.
If there are no more dependancies than invalidation of procedure won't cause any cascading effect.
You can also change procedure code and dump message in alert.log when it's run - see http://www.oracle.com/technology/oramag/code/tips2003/011203.html for the call you can use.
2005/11/10, Maimon Oded <oded.maimon_at_gmail.com>:
> 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_at_gmail.com> 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.
> > --
> > http://www.freelists.org/webpage/oracle-l
> >
> >
> >
>
>
-- Best regards, Alex Gorbachev -- http://www.freelists.org/webpage/oracle-lReceived on Thu Nov 10 2005 - 13:22:22 CST
![]() |
![]() |