Created
April 1, 2016 21:13
-
-
Save kristinaconley/1c6d9f8ad267a9f4df45c9b6c00509d5 to your computer and use it in GitHub Desktop.
Search all databases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec sp_MSForEachDB | |
' | |
USE ? | |
SELECT DISTINCT | |
o.name AS Object_Name, | |
o.type_desc, | |
m.definition | |
FROM sys.sql_modules m | |
INNER JOIN sys.objects o | |
ON m.object_id = o.object_id | |
WHERE m.Definition LIKE ''%HQ-SQL-06%'' | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment