Go to settings,Autoreplacements and add new autoreplacement with
token "sis" and following Replacement text:
This is an easy way to look through the sources of all objectes in the database
if you need to find particular string. This script can be used, for example,
to find references of some specific object by other objects. Depending on the
size of your database you might want to limit the search scope to particular
object type. Just commend unneeded object types in WHERE statement.
Enter search string between %% marks in @SearchPattern initialisation statement.
When you get the results you can copy object name from "FullName" column and
use SSMSBoost to quickly locate it in object explorer, of you can search further
in results using "Find in ResultsGrid" function.
This script is provided to you by SSMSBoost as is. Improvements and comments are welcome.
Redistribution with reference to SSMSBoost project website is welcome.
SSMSBoost team, 2013
DECLARE @SearchPattern NVARCHAR(128)
SET @SearchPattern = '%#%'
SELECT SCHEMA_NAME(o.schema_id) as [schema]
,'['+SCHEMA_NAME(o.schema_id)+'].['+o.[name]+']' as FullName
,OBJECT_DEFINITION(object_id) AS [Source]
FROM sys.objects AS o
WHERE lower(OBJECT_DEFINITION(o.object_id)) LIKE lower(@SearchPattern)
AND o.[type] IN (
'C',--- = Check constraint
'D',--- = Default (constraint or stand-alone)
'P',--- = SQL stored procedure
'FN',--- = SQL scalar function
'R',--- = Rule
'RF',--- = Replication filter procedure
'TR',--- = SQL trigger (schema-scoped DML trigger, or DDL trigger at either the database or server scope)
'IF',--- = SQL inline table-valued function
'TF',--- = SQL table-valued function
'V') --- = View