Applies to
ApexSQL Snapshot Utility, ApexSQL Build, ApexSQL Diff and ApexSQL Doc
Summary
This article describes the ApexSQL Snapshot Utility and how to use it in other ApexSQL applications.
Description
What is a snapshot?
A snapshot is a read-only file in a binary format that stores the complete information of a database schema. It can be used as a data source in ApexSQL Build, ApexSQL Diff and ApexSQL Doc.
ApexSQL Snapshot Utility enables creating snapshots without using any of the three mentioned applications. The application can be installed on multiple remote sites. It can be used in the following scenarios:
- To synchronize two or more disconnected databases
- To transfer the schema changes from a development database to client databases when a client database is not accessible
- To capture and store a remote database schema
- To load a snapshot of a remote database schema into a source control system
- To load a snapshot for building a database from it
- To load a snapshot for creating documentation from it
Where can I download the ApexSQL Snapshot Utility?
ApexSQL Snapshot Utility can be acquired from the ApexSQL download page as the standalone installer, or it can be accessed as a feature in ApexSQL Build, ApexSQL Diff and ApexSQL Doc.
Using ApexSQL Snapshot Utility
In order to create snapshot using ApexSQL Snapshot Utility, start the application and after selecting the server, setting the connection options, and selecting the database for which the snapshot will be created, the Create button can be clicked:
The Save window will be shown and the location where the snapshot file will be saved can be selected.
The default location of the saved file is:
C:\Users\<Username>\Documents\ApexSQL\ApexSQLSnapshotUtility2016, and the file can be later retrieved from this location to be archived, sent via e-mail or for example, used in ApexSQL Diff as a data source for comparison and synchronization.
After selecting the save location of the snapshot file, the snapshot will be created and saved.
How to use ApexSQL Snapshot Utility in other ApexSQL applications?
ApexSQL Build has the Export data source feature in the main application window, under the Home tab. Since it can build/update a database by using a snapshot file, it also has this feature to create a snapshot file:
Once a database is chosen and the OK button is clicked, the Save window will be shown and the location where the snapshot file will be saved can be selected.
The default location of the saved file is:
C:\Users\<Username>\Documents\ApexSQL\ApexSQL Build\Export
ApexSQL Diff has a feature that allows users to create a SQL database snapshot, as well as using it for comparing and synchronizing with other SQL data sources. This feature can be accessed with a click on the Export data source button in the New project window.
After that, Snapshot needs to be selected as an export type in the Export data source window, and after the server is selected, the connection options are set and the database for which the snapshot is being created is selected, the OK button can be clicked to continue with creating snapshot:
The Save window will be displayed and the location where the snapshot file will be saved can be selected.
The default location of the saved file is:
C:\Users\<Username>\Documents\ApexSQL\ApexSQL Diff\Export, and the file can be later retrieved from this location to be archived, sent via e-mail or used in ApexSQL Diff as a data source for comparison and synchronization.
After selecting the save location of the snapshot file, the snapshot will be created and saved.
ApexSQL Doc has the Create database snapshot feature in the main application window, under the Home tab. Since it can create documentation by using a snapshot file, it also has this feature to create a snapshot file:
Once a database is chosen and the Create button is clicked, the Save window will be shown and the location where the snapshot file will be saved can be selected.
The default location of the saved file is:
C:\Users\<Username>\Documents\ApexSQL\ApexSQL Doc\Export
Using snapshots to synchronize remote databases
ApexSQL snapshots are especially useful when dealing with remote databases. A database snapshot can be created and easily shared among peers (e.g. through email). The snapshot recipient who has ApexSQL Diff can use it as a data source. The snapshot can be compared to another snapshot or to a live database.
Does ApexSQL Snapshot utility have CLI?
Yes. To create a snapshot, use the following command in ApexSQL Snapshot Utility installation folder:
ApexSQLSnapshotUtility /s:server_name /d:database_name /ms:snapshot_name.axsnp /v /f
For example:
ApexSQLSnapshotUtility /s:SQLServer2017 /d:AdventureWorks2018 /ms:AW2018Snapshot.axsnp /v /f