SQL Source Control - 3.0
Getting a specific version - SQL Source Control
You can update your database to a specific version using the History dialog box
Note that when you do this, the current database schema (and any data you have source controlled) is overwritten with the version you selected.
Getting a specific version within SQL Source Control requires SQL Server Management Studio Integration Pack and SQL Compare 8.50 or later
Alternatively, if you do not have SQL Server Management Studio Integration Pack installed, you can manually create a local copy using your source control system, and synchronize it with the database using SQL Compare
Getting a specific version from the History dialog box
When you get a version form the History dialog box, SQL Compare is used to update the target database.
To get a specific version:
- On the History dialog box, select the version you want to get.
- Click Update to this version with SQL Compare
A progress dialog box is displayed while the details of the version you selected are determined.
- A SQL Compare project launches with the version you selected set as the source, and the database as the target:

- To update the database, perform the comparison, ensure all objects you want to update are selected, and run the synchronization wizard.
For more information, see Worked example: Comparing and synchronizing two databases, in the SQL Compare documentation.
Getting a specific version manually
If you do not have SQL Server Management Studio Integration Pack installed, you can get a specific version using your source control system and SQL Compare.
Example: getting a specific revision with TortoiseSVN
This example creates a local copy of the revision, and synchronizes the database using SQL Compare:
- Check out the latest version to a new folder.
- Right-click the folder, and from the TortoiseSVN menu, select Show log
The Log Messages dialog box is displayed.
- Select the revision you want to get, right-click, and click Revert to this revision
- A confirmation dialog box is displayed. Click Yes
The folder of scripts is updated to the revision you selected.
- Using SQL Compare, set the scripts folder as the source for a comparison, and the database as the target, then compare and synchronize.
The database is updated to the revision you selected.
Example: getting a specific changeset with TFS
This example updates the TFS local copy to a specific changeset, and synchronizes the database using SQL Compare:
- In Visual Studio, in the Source Control Explorer tab, select the database, right-click, and click Get Specific Version
The Get dialog box is displayed.
- Under Version, in Type select Changeset
- Type the changeset number, or click the browse button to display the Find Changesets dialog box, and select the changeset you want.
- Click Get
The local scripts folder has been updated to the changeset you selected.
- Using SQL Compare, set the local scripts folder as the source for a comparison, and the database as the target, then compare and synchronize.
The database is updated to the revision you selected.
See also |
Was this article helpful?
SQL Source Control
- Setting SQL Compare options within SQL Source Control
- "ICredentialsProvider is unset, therefore can't get" error occurring within SQL Source Control
- Linking fails due to SVN pre-commit hooks
- Logging changes to shared databases
- Object changed by Unknown
- Setting permissions for SQL Source Control
- Using SQL Source Control with Team Foundation Server 2012 or tfspreview.com
- Error: Failed to resolve no-ops after 5 tries
- Using SQL Compare or SQL Changeset scripts with SQL Source Control
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
SQL Source Control
- Database development models
- Release notes - version 1.0
- Release notes - version 1.1
- Release notes - version 2.0
- Release notes - version 2.1
- Release notes - version 2.2
- Requirements & prerequisites
- Technical Overview
- Release notes - version 3.0
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Step by step examples