David Foderick's Blog - OnMaterialize()

Find SQL Server dependencies

Let's say you've created some fantastic stored procedure or User Defined Function (UDF) in SQL Server. You then want to make a change to the proc or function and you want to know all the other procs that call it. Naively, you may think that Enterprise Manager or sp_depends will tell you that information. But it won't.

In order to find all callers of your function, you can use a query like this:

SELECT object_name(id), Text
FROM SysComments
WHERE Text LIKE '%MyFunc%'

 

Comments

cheap car insurance in michigan said:

Its such as you read my mind! You appear to know a lot about this, like you wrote the e-book in it or something. I think that you simply can do with a few p.c. to drive the message home a bit, but other than that, that is great blog. A great read. I'll definitely be back.  <a href="michigancarautoinsurance.com/">cheap car insurance in michigan</a>

# July 29, 2011 10:10 AM

Becky said:

Now I know who the brainy one is, I'll keep lokoing for your posts.

# October 1, 2011 1:24 AM

Brandywine said:

Stay inofrmaitve, San Diego, yeah boy!

# October 7, 2011 8:18 AM

Custom Essay Writing said:

I don't realize if Essay Service providers hire PhD writing specialists. However, I am fulfilled with custom essay papers I get.

# October 14, 2011 3:41 AM

auto insurance rates said:

Wow! This could be one particular of the most helpful blogs We have ever arrive across on this subject. Actually Wonderful. I'm also a specialist in this topic so I can understand your effort.  <a href="topautoinsurancerates.net/">car insurance rates</a>

# October 18, 2011 2:50 AM

Kayoko said:

Your aeilctrs are very inspiring indeed. I keep coming back! There are so many things I agree on. I hope we can exhange ideas in the future.

# February 18, 2012 12:31 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)