Q
Problem solve Get help with specific problems with your technologies, process and projects.

Stored procedure overview in SQL Server

How can I get an overview of all stored procedures and the tables they use?

How can I get an overview of all stored procedures and the tables they use?
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.

This was last published in February 2007

Dig Deeper on SQL Server Stored Procedures

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close