Sam Beauvois: general dev, .net and other stuff

How to get the list of all stored procedures using a specific table

Big projects with a lot of stored procedures can be a mess to maintain.

If you change one field in a table, you have to check if there is no side effect in the stored procedures using this table.

This “sp_depends” system stored procedure can help you finding your stored procedures using the table you modified.

Just create a new query, type


EXEC sp_depends @objname='tableName'

(replace “tableName” by the name of your table)

then execute.

result example :

example result

example result

You can follow any responses to this entry through the RSS 2.0 feed.