SQL Server 2008 Object Search

At the top of the Object Explorer Details (OED) panel, which you can show by pressing F7 in SQL Server Management Studio, you'll find a "Search" text box.

If you want to find an object in a particular database, just click on any database object in the Object Explorer (OE). Then enter the name of the object you want to find. If you want to search all databases, click on the "Databases" node in OE and then enter the text string.

Note: Searching all databases can be expensive and take a while. There is a "Cancel" button in case you change your mind.

If you want to find an exact match on an object name, just enter the text you want (it isn't case-sensitive unless your database is). If you want a partial match, then use the standard T-SQL wildcards. For instance, Buck% finds all objects that start with "Buck". %Buck% finds all of the objects that have "Buck" in the name.

Once you find the object, you can right-click them to perform certain actions on them. If you want the full range of right-click options, then right-click the object and select "Synchronize" to find the object in OE, where you'll have all of the options.

Comments (5)

  1. Robert says:

    Except it doesn't work. OK, it will search for object names, but won't search the contents of those objects. So if I wanted to find all objects that contain references to 'MyTable', this feature is useless.

    8 years, and Microsoft still can't get this basic functionality working.

  2. b.chatsrinopkun says:

    try this


    where routine_definition like '%WHATEVER_YOU_WANT%'

  3. b.chatsrinopkun says:

    or try this

    select * from sys.sql_modules

    where definition like '%WHATEVER_YOU_WANT%'

  4. sushil agarwal says:

    thanks for your valuable page & effort u took to make it

Skip to main content