xSQL Comparison Bundle for SQL Server
Schema Snapshot Utility

Snapshot Utility is a tool that allows you to create database snapshots via the command line. A snapshot is a file that stores the structure of a database, that is tables, views, procedures and all other objects. This information is stored in a proprietary format and can only be read by schema compare.

A snapshot file stores only the structure of the database, with no user-data of any kind. It can be used to recreate the tables and other objects in a database, but the tables will be empty.

The snapshot utility accepts parameters in the format /name:value. Spaces between the name and the value are not allowed. The value is separated from the name with a colon <:>. If the value itself contains spaces, it should be surrounded in double quotes.

The snapshot utility accepts the following command line parameters:

 

Examples: 

The following command creates a snapshot for the database AdventureWorks on the local SQL Server using a trusted connection:

xSQLSnapshot /s:(local) /d:AdventureWorks /sp:"c:\AdventureWorks.snpx"

 

The following command creates a snapshot by specifying a connection string:

xSQLSnapshot /cs:"Persist Security Info=False;User ID=<username>;Password=<password>;Initial Catalog=AdventureWorks;Data Source=(local)" /sp:"c:\AdventureWorks.snpx"

 

The following command uses the setting file snapshot.txt to create the snapshot for two databases:

xSQLSnapshot /f:"c:\snapshot.txt"

The setting file snapshot.txt contains the following lines:

 

 

 


Copyright © 2022 xSQL Software - All rights reserved.