Looking up Stored Procedures Containing ‘%x%’
This isn’t really big news, but I have had to look it up twice in the last quarter. To find which stored procedures contain a specific text string, use:
SELECT Name, OBJECT_DEFINITION(OBJECT_ID)
FROM sys.procedures sp
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%Language%'