Home / Software / Tips and Tricks / Search for Stored Procedures, UDFs, Views and Triggers using Text in SQL Server

Search for Stored Procedures, UDFs, Views and Triggers using Text in SQL Server

Updated:  10/18/2011 10:10 AM
Author:  Shiju Mathews

Status:    Resolved.


It circumstances that the developer need to search for objects that are using a particular text. For instances that you are renaming a column in a table and you want to make sure that you are not breaking any existing code.

It searches the text of triggers, UDFs, stored procedures and views for a particular substring, returning the name and type of those database objects that match.



Where "UserName" is the text that we want to search.