Retired products

Qualify Object Names

The Qualify Object Names refactoring modifies the SQL script so that all object names are qualified in the format:

[owner].[object]

SQL Refactor takes USE database statements into account to ensure that the correct owners are identified.

The SQL Server name and database name qualifiers are not added to the names.

 

To qualify object names:

  1. Open the script in a SQL Server Management Studio query editor.
  2. Ensure you are connected to the SQL Server and database that contains the objects that are referenced in the script.

    If the selected code contains USE database statements, SQL Refactor will change the connection as appropriate.

  3. If required, select the code that contains the object names that you want to qualify.
    If you do not select any code, the all object names in the script are qualified.
  4. On the SQL Refactor menu, click Qualify Object Names.

A progress dialog box is displayed. SQL Refactor connects to the SQL Server to find out the owner of each object, and then modifies the script.

You can undo the changes to the script using the standard SQL Server Management Studio Undo features.

To keep the changes, save the script in the usual way.

If any object names could not be qualified, for example because they cannot be found in the database, an error dialog box is displayed and the object names are underlined in red in the query editor.


Didn't find what you were looking for?