Recently I was faced with situation where I had to find all the store procedures referencing a table from within and across other databases. Since I did not get a code to get SPs from all the databases on the server, I came up with this script. Although, I am just searching for table name, it's possible there could be a table with same name but with different schema or in a different database.
Introduction to Stored Procedures
Here's a general overview for creating and editing stored procedures. Head over to the discussion forum for this article and present your creative ideas for using this powerful feature of SQL Server to the SSC community.
2002-05-27
19,720 reads