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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: how to count the usage of a SQL function?

Re: how to count the usage of a SQL function?

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Wed, 08 May 2002 01:33:18 -0800
Message-ID: <F001.0045B162.20020508013318@fatcity.com>


Steven Joshua wrote:
>
> Hello, List:
>
> We have more than 100 triggers in the database. Some
> of them use ORACLE NEW_TIME function in the code. Is
> there a way that we can count how many triggers are
> referencing NEW_TIME function?
>
> I used below query, but it will only count the
> function that we created in the database. how can can
> count SQL function (NEW_TIME)?
>
> Select Count(*) From USER_DEPENDENCIES
> Where Type in ('PROCEDURE', 'TRIGGER')
> And REFERENCED_TYPE = 'FUNCTION'
> And REFERENCED_NAME = 'TIME_CONVERT'
>
> Thanks a lot
>
> Steven
>

Write a PL/SQL block which fetches column TRIGGER_BODY fro DBA_TRIGGERS into a VARCHAR2(32767) and loop on this result until instr(upper(substr(large_string, current_pos)), 'NEW_TIME') returns 0. Brute force.

-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed May 08 2002 - 04:33:18 CDT

Original text of this message

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