Search all Stored Procedures where a Table is referenced – SQL Server

A couple of months ago, I wrote a post on how to Search Inside a SQL Server Stored Procedure Definition. A user wrote back asking if it was possible to do the same using an Add-in in SQL Server Management Studio (SSMS).

The answer is yes and there is a ‘Free’ SSMS add-in provided by RedGate. It is called SQL Search (check the Free download button to the right)

SQL Search finds fragments of SQL text within stored procedures, functions, views and more and once you find them, it quickly allows you to click and jump to the objects, wherever they happen to be on your servers. It’s pretty cool!

Assuming you have downloaded the add-in, let us say we search for all Stored procedures in the Northwind database that use the table ‘Customers’

image

The search is super quick and the results are returned dynamically as you type. You can also filter the search results by object type, database, or by server.

Note: SQL Search supports SSMS 2005, SSMS 2008, SSMS 2008 Express, R2. This example was infact run on a SQL 2008 Express R2.

Download the Free SQL Search Add-In

No comments:

Post a Comment