Learn more about Toad for SQL Server
at Quest.com

Find solutions and downloads at the
Toad for SQL Server Support Portal

< To bookmark a page, right-click the Page Title and select Add to Favorites / Bookmark This Page

Toad for SQL Server 5.7

You are here: Use Version Control > Version Control Objects > Update Databases and Schemas

Update Databases and Schemas

You can update a database or schema with the latest changes from version control. This is useful when a database or schema exists in multiple environments, such as development, test, and production environments. The feature retrieves changes from version control for one database or schema and applies those changes to another database or schema without requiring a check out or check in. By default, the most recent changes are applied. However, you can specify which revision to use for each object.  

For example, as a developer at Nick's Flix movie rentals, you made significant updates to the Actors development database. You used version control throughout the development process. Now, your team wants to apply these changes to the test database so QA can verify the changes before moving them into the production database. With update database, you can apply changes from the database to any version-controlled object in the test database.

Note: The target database or schema must be under version control to use this feature. You can add databases to version control at a later time by selecting the database under Tools | Options | Version Control | Objects.

To update a database or schema

  1. Right-click any version-controlled object in the target database or schema and select Version Control | Update <Database or Schema>.

  2. Select an object under Description and review current and target versions.

    Notes:

  1. If you want to select a different target version for an object, right-click the number and comment for that version under Description and select Set Target Version.

  2. Select the Allow drop statements checkbox.

  3. Select script options as needed. These determine whether descriptions, check in times, revision numbers, and comments are included in the update script. They do not affect the database or version control.

  4. Click Execute.

    Note: If an error occurs during script execution, make a note of the problem description, close the window, and resolve the problem.

 

Related Topics