Rename scripted objects

You can rename an object to better reflect its purpose. The Studio automatically updates all references to the renamed object.

Renaming is available for the following objects in a script:

 
  • Tables
  • Columns
  • Views
  • Stored procedures
  • Functions
  • Triggers
 
 
  • Logins
  • Types
  • Rules
  • Sequences
  • Synonyms
  • Named transactions
  •  
  • Cursors
  • Queues
  • Contracts
  • Service
  • Routes
  • Column master keys
  •  

Warning

Renaming of objects is unavailable in a database.

To rename an object:

1. In the SQL document, select the object using one of the following methods:

  • Right-click the object and select Refactoring > Rename.
  • Click the object and press F2.

The object becomes highlighted.

2. Enter a new name for the object.

3. Optional: To preview the code changes:

3.1. Press F2.

3.2. In the Preview Changes - Rename dialog, view the code changes.

3.3. Click Apply to apply the changes.

4. To apply the code changes without previewing, press Enter or Tab.

Preview the code changes

Note

dbForge Studio analyzes the script and renames only objects of the same type, preventing unintended changes to column names when an object shares the same name.

Tip

To undo the renaming, press Ctrl+Z.