Searching Stored Procedures

Here is a quick and easy way to search of stored procedures, views, user functions from within a database:

 –Search ALL user functions, views, stored procs

USE [PortalData]

SELECT OBJECT_NAME([id]) FROM syscomments

WHERE [id] IN (SELECT [id] FROM sysobjects WHERE xtype IN (‘fn’, ‘P’, ‘v’, ‘TR’, ‘U’, ‘X’))

AND [text] LIKE ‘%TypeSearchStringHere%

  1. Leave a comment

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: