SQL Search 3

How to search

This page explains how to search for objects using SQL Search, how to narrow the scope of a search, and what search syntax is supported.

Opening SQL Search

SQL Server Management Studio

To open SQL Search in Management Studio, click SQL Search in the Redgate toolbar:

If you can't see the Redgate toolbar, enable it by right-clicking in the toolbar area and clicking Redgate.

Visual Studio

In Visual Studio, SQL Search can be found in the Tools menu.

How to search

To search, type in the search bar: 

Contents:

 

Search results appear when you've typed two or more characters. The results update as you type.

The first 500 results are shown for each database. If there are more than 500 results, a banner is shown at the bottom of the search results panel:

To see the rest of the results, click Show all.

Searching for an exact word or phrase

By default, SQL Search returns objects that contain the search terms you typed anywhere in the object. To search for an exact word or phrase, select Match whole words only.

When using match whole words only, it won't match parts of words or phrases. For example, searching for "user" won’t return "username", and searching for "myTable" won't return "[myTable]".

Changing the search scope

You can search specific servers, databases, or object types. Select these on the drop-down menus to the right of the search bar:

Wildcards

You can use the following wildcards in a search:

Asterisk (*) wildcard

You can use * as a wildcard to match 0 or more characters, similar to a SQL LIKE clause.

For example, search for 'b*' to find all objects containing words beginning with b.

Question mark (?) wildcard

The ? wildcard to matches exactly one character.

For example, search for 'b?' to find all objects containing words of two characters beginning with b.

List ([]) wildcard

This [] wildcard matches one character from a list of characters.

For example, search for '[xyz] ' to find all objects containing any single x, y, or z character.

This wildcard also allows a range of characters. For example, search for '[a-z]' to match any single character from a to z.

Caret (^) wildcard

You can use ^ as a wildcard at the beginning of a list to match any character except any character in the list.

For example, search for '[^0-9]' to match any single character except a numeric character.

Escaping wildcards

If you want to search for a wildcard as a literal character, you can escape the wildcard character by wrapping it in square brackets.

For example, searching for '[*]' will search for anything containing an asterisk.

Please note that this does not work with square brackets themselves.

Search limitations

Object Type Limitations

When searching in 'Other' object types, SQL Search doesn't find some object types, including roles, certificates, and full-text catalogs. 

This is because it only indexes objects in the following Object Catalog Views:

  • sys.objects
  • sys.sql_modules
  • sys.check_constraints
  • sys.default_constraints
  • sys.computed_columns

Any object types that aren't in these views won't be found by SQL Search.

Square Brackets

Square brackets around identifiers are filtered out of the index we create to provide fast searches, so you can't match on them even if you are using wildcard matching and escape them.


Didn't find what you were looking for?