Wednesday, October 8, 2014

oracle How can I tell where my database function was used




http://stackoverflow.com/questions/4670164/how-can-you-tell-if-a-pl-sql-package-procedure-or-function-is-being-used
 
As mentioned in the above stackoverflow thread , below query can be used to find where your database function/procedure has been used.
 
SELECT * FROM all_source where UPPER(TEXT) like UPPER('%YOUR_DATABASE_FUNCTION_NAME%')
 
The oracle documentation for all_sources can be found at below link
 
 http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2063.htm 


Below post is also very informative

http://oracletuts.net/sql/how-to-search-code-using-user_source-and-all_source-in-sql/