IDERA Snapshot Utility is a tool that allows you to create database snapshots via the command line. A snapshot is a file that contains all the schema information for a database. The schema information is stored in a proprietary format and can only be read by the IDERA SQL Schema Compare user interface or command line.

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. There are no spaces between the name and the value and the value is separated from the name with a colon <:>. If the value itself contains spaces, it should be surrounded in double quotes.

Idera Snapshot Utility supports the following arguments:

  • /s:<server> Specifies the SQL Server instance.
  • /d:<database> Specifies the database name.
  • /t: Indicates that the connection to the database should be a trusted connection. If not specified, the connection by default is trusted.
  • /u:<username> Specifies the username when the database uses the SQL Server authentication.
  • /p:<password> Specifies the password when the database uses the SQL Server authentication.
  • /sp:<filename> Saves the snapshot to the specified filename. If the filename is not set, the snapshot file will be named as database.snpx.
  • /cs:<connection_string> Specifies the connection string to the database. Use this option when you need to set additional settings that are not supported directly such as the connection timeout.
  • /f:<setting_file> Creates the snapshot using the settings in the specified file. When the /f parameter is specified, all other parameters are ignored. In addition of being easier to manage, using a setting file allows you also to create snapshots for multiple databases. In this case use one line per database.

Samples:

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

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

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

IderaSnapshot /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:

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

The setting file snapshot.txt contains the following lines:

/s:(local) /d:AdventureWorks_DEV /sp:"c:\AdventureWorks_DEV.snpx"
/s:(local) /d:AdventureWorks_PROD /sp:"c:\AdventureWorks_PROD.snpx"


IDERA |  Products | Purchase | Support |  Community |  Resources |  About Us  | Legal
  • No labels