Skip to main content

You are here

SQL Server

Search the entire Database for an Object containing a string

This query searches the entire database for objects containing the indicated string. This, among other uses, is good for locating a piece of code no mather where they reside in the database.

SELECT DISTINCT OBJECT_NAME(ID)
FROM SYS.SYSCOMMENTS
WHERE TEXT LIKE '%[TEXT TO SEARCH FOR]%'

Tags: 

Premium Drupal Themes by Adaptivethemes