SQL Search 1

Using SQL Search

Opening SQL Search

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

Alternatively, open SQL Search with Ctrl+Alt+D.

Searching

To search, type in the search bar: 

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

A maximum of 150 results are returned for each database.

Filtering the search

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

Normally, SQL Search returns objects that contain all the search terms somewhere in the object. To match phrases exactly, select Exact Match. With Exact Match, SQL Search returns objects containing the exact phrase searched for. 

Known issue

Exact Match sometimes means that one-word search terms will only match whole words, not parts of words. For example, normally, searching for name would return objects containing the word namespace. With Exact Match, namespace may not be returned.

Previewing text

For some search results, such as text in a stored procedure, SQL Search can display a preview of the result:

If a preview is available, when you select the row, the text is displayed below the search results. The search terms are highlighted in the preview.

Navigating to objects in the Object Explorer

To open an object in the Object Explorer, double-click the object in the search results, or select the object and click Select object in Object Explorer.

Exporting results

To export search results, use copy and paste. Copying a row also copies the header row of the results table. 

Standard copy-and-paste shortcuts are supported. Use Ctrl+C to copy, Shift+click to select a range, Ctrl+click to select multiple rows, and Ctrl+A to select all rows.

If you have trouble copying from SQL Search, see Unsaved documents cannot be cut or copied to the clipboard from the Miscellaneous Files project.


Didn't find what you were looking for?