With the command line you can compare live databases or snapshot files. A snapshot is a file where the database schema is serialized. It does not contain data, just the schema information. The information is stored in a proprietary format and can only be read by the IDERA SQL Schema Compare user interface or command line. Snapshots do not require authentication, live databases or the other hand can use either Windows of SQL Server authentication.

All database-related settings are specified in the xml config file under the <LeftDatabase> and <RightDatabase> elements. The following xml fragment specifies Left_DB and Right_DB on the local SQL Server. Trusted connection is used for the Left_DB database and SQL Server authentication is used for the Right_DB database:

<LeftDatabase>
     <SqlServer>(local)</SqlServer>
     <DatabaseName>Left_DB</DatabaseName>
     <TrustedConnection>true</TrustedConnection>
</LeftDatabase>

<RightDatabase>
     <SqlServer>(local)</SqlServer>
     <DatabaseName>Right_DB</DatabaseName>
     <TrustedConnection>false</TrustedConnection>
     <Username>username</Username>
     <Password>password</Password>
</RightDatabase>

To compare snapshots instead of live databases, use the <SnapshotFile> element as in the following xml fragment:

<LeftDatabase>
     <SnapshotFile>AdventureWorks_DEV.snpx</SnapshotFile>
</LeftDatabase>

<RightDatabase>
     <SnapshotFile>AdventureWorks_PROD.snpx</SnapshotFile>
</RightDatabase>

 

Total compare from data to schema with IDERA SQL Comparison Toolset. Learn more > >
  • No labels