Posted By

heathbo on 10/24/14


Tagged


Versions (?)

SQL: How To Search All Files For Specific Text


 / Published in: SQL
 

This query shows how to search all the files associated with a database for specific text.

  1. SELECT DISTINCT o.name AS Object_Name,o.type_desc
  2. FROM sys.sql_modules m
  3. INNER JOIN sys.objects o
  4. ON m.object_id=o.object_id
  5. WHERE m.definition LIKE '%YourSearchTextHere%'

Report this snippet  

You need to login to post a comment.