Of course, you can write your own SQL code to search for objects in SQL Server and here is one simple query:
Giving that Type (Object Types) are:
AF = Aggregate function (CLR)
C = CHECK constraint
D = DEFAULT (constraint or stand-alone)
F = FOREIGN KEY constraint
FN = SQL scalar function
FS = Assembly (CLR) scalar-function
FT = Assembly (CLR) table-valued function
IF = SQL inline table-valued function
IT = Internal table
P = SQL Stored Procedure
PC = Assembly (CLR) stored-procedure
PG = Plan guide
PK = PRIMARY KEY constraint
R = Rule (old-style, stand-alone)
RF = Replication-filter-procedure
S = System base table
SN = Synonym
SQ = Service queue
TA = Assembly (CLR) DML trigger
TF = SQL table-valued-function
TR = SQL DML trigger
TT = Table type
U = Table (user-defined)
UQ = UNIQUE constraint
V = View
X = Extended stored procedure
but you can also use third party applications that are light and easy to use. I like in particular the SQL Search 1.1 from RedGate.
You can download the application from their site:
http://www.red-gate.com/products/sql-development/sql-search/
There are two reasons why I like this tool:
One its FREE to use.
Two it has a unique feature that I like and it really saves my time at work. (read until the end) After performing a search query, the result of all objects will appear in the result section – like the snapshot below and here is a brief description of its main functionalities:
- SQL Search Tool Bar: is added to your SSMS for a convenient Search request Anew window will open when is clicked
- Search Area: is where you can type your search query either full name or any part
- Exact Match: if ticked then search result return only the exact match to your search phrase
- Objects: you can filter the result by object type (i.e. Tables, Views)
- Result Area: is the list of objects returned from your search query
- Is a code over-view from the select object in the result screen.
Now here is the best part of this tool. If you double click on one of the objects in the search result area, it will take you directly to the objects in the SSMS Object Explorer:
This will save a lot of time when you have long list of objects and you need to browse through them in order to fine the one that you are interested in.
Enjoy & Have Fun!!