This is just quick tip found from this link and is actually good to use as a starting point:
USE DATABASE; GO SELECT [Schema] = schema_name(o.schema_id), o.Name, o.type FROM sys.sql_modules m INNER JOIN sys.objects o ON o.object_id = m.object_id WHERE m.definition LIKE '%YOUR-STRING%' GO
Further Reading
How to Find All References to an Object in a SQL Server Database
How to Search for a String in All Tables in a Database
How to find a specific text string in a SQL Server Stored Procedure, Function, View or Trigger
How to Find a Column Name in SQL Server Database
How to Get Names of All Tables in SQL Server
Leave a Reply