Provides a quick and easy way to create a snapshot of a database. The action can be executed directly against the server or scripted to a new SQL window so you can run it yourself.
- What's a database snapshot?
- It's best to read the Microsoft docs, but the short answer is that a database snapshot is a static,
read-only
copy of a source database that gives you a consistent view of a database as of a certain point in time. You can recover the source database to the point when the snapshot was created from a database snapshot.
- It's best to read the Microsoft docs, but the short answer is that a database snapshot is a static,
- Can multiple snapshots be created quickly without lot of typing of sql commands?
- Sure. The default setting for the extension is to create a snaphot name based on the source db name and a timestamp. A simple righl-click will create or revert the snapshot. See the example here.
- Can I choose my own naming convention for my database snapshots?
- Yes, you can. Configure the extension to just script the necessary SQL statements to create the snapshot. You can then change the name (and file location) if desired. Refer to the animated gif below. Script Only Example
The current release is available to download as a .vsix file and can be installed by opening the File Menu and selecting Install Extension from VSIX Package
This extension contributes the following settings:
snapshotCreator.scriptOnly
: If this is checked, the snapshot extension will only create the SQL commands necessary to create or revert a snapshot. If you want the extension to actually execute the commands against the database, then leave this unchecked.
- Navigate to a database object in the Object Explorer Tree.
- Right click on a database node to bring up the context menu.
- If the database node is a database (and not a database snapshot), you have the option to create a snapshot.
- If the database node is a database snapshot, you will have the option to revert the source database from the snapshot.
- This only works with the MSSQL provider, i.e. Microsoft SQL Server.
- Azure Data Studio lacks metadata information to indicate whether or not a database node is an actual database or a database snapshot. (This differs from SQL Management Studio where Database Snapshots are grouped under their own parent node.) As such, this extension assumes that all database nodes are actual databases unless the database name has
snapshot
in it. Hopefully the Azure Studio team will see fit to include this information in a future release.
Can be raised here: https://github.com/ecirpnaes/DbSnapshotCreator/issues
Can be found here: https://raw.githubusercontent.com/ecirpnaes/DbSnapshotCreator/master/CHANGELOG.md