Thread: MS SQL Server General Questions/Find any text in your SP or name of the objects in database

Find any text in your SP or name of the objects in database


select



object_name(m.object_id),schema_name(schema_id)

from


sys.sql_modules m join sys.all_objects a

on


m.object_id=a.object_id

where


definition like '%searchexpr%'