Take a look at sp_depends and sys.sql_dependencies. These can get out of sync though. One approach I often take when looking for code that touches a table named Employees would be with a query like:
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%Employees%'
But that's a brute force search that also depends upon your stored procedures not being compiled with encryption.
|