Update to a revision from source control
Last modified: October 28, 2024
Schema Compare allows you to update a database to a particular revision from the version control repository.
Use case overview
You might encounter a scenario where you need to revert a database to an earlier version.
For instance, a stored procedure is created and committed to the source control repository. Later, additional changes are made and committed as well. If issues arise after the latest commit, you will be forced to revert the changes and restore the earlier version from source control.
This topic outlines the steps required to restore a specific version of any database object.
Steps to resolve the case
To update your database schema to a particular version:
1. On the File menu, click New Schema Comparison.
2. In the New Schema Comparison wizard, specify Source and Target connections.
3. Under Source, specify Source Control as Type and indicate the name of your Repository.
See also: How to configure a link to your repository.
4. Specify the Revision you want to update the database to. Note that the Latest (Head) Revision is specified by default.
5. To specify a different revision, choose <…Select a specified revision…> from the drop-down list. In the Revision history window that opens, you can see the list of the source-control revisions of your database.
6. Select a required revision, and you will see the code changes introduced by the commit in the Window below. You can also read a commit message and identify the operation that has taken place in this particular revision.
7. Configure the rest of the settings and start the comparison process.
8. Click to synchronize the objects to the target database. Configure and run the synchronization.
9. The database is updated to the revision you selected.
Note
If you update your database to a particular revision, the current database schema will be overwritten by the changes introduced with the selected version.
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by Schema Compare for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.