November 28, 2012 at 4:21 am
Hi Team,
am using a function (Fn_Split) in sql, i want to know that from where(in which stored procedure,etc) particular function is called.
thank you in advance...
November 28, 2012 at 4:36 am
RedGate sqlsearch may be your best bet
November 28, 2012 at 5:30 am
You can search stored procedure definitions by joining sys.objects to sql_modules and doing a WHERE clause with a LIKE statement on the definition column of sql_modules. That should locate all references to the function.
November 28, 2012 at 5:37 am
Brandie Tarvin (11/28/2012)
You can search stored procedure definitions by joining sys.objects to sql_modules and doing a WHERE clause with a LIKE statement on the definition column of sql_modules. That should locate all references to the function.
and a code example of Brandi's suggestion:
--kinda slow, took 11 seconds on my machine
SELECT objz.name
from sys.objects objz
left outer join sys.sql_modules modz
on objz.object_id = modz.object_id
where definition like '%Fn_Split%'
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply