You can use the command line to create a database snapshot before comparing the schema.

The following xml config creates a snapshot for the database AdventureWorks_DEV and compares AdventureWorks_DEV and AdventureWorks_PROD database in the local SQL Server:

<?xml version="1.0" encoding="utf-8" ?>
<CommandLineParameters xmlns="http://www.xsql.com/sqlschemacmd.xsd">
     <LeftDatabase>
          <SqlServer>(local)</SqlServer>
          <DatabaseName>AdventureWorks_DEV</DatabaseName>
          <TrustedConnection>true</TrustedConnection>
          <CreateSnapshot>AdventureWorks_DEV.snpx</CreateSnapshot>
     </LeftDatabase>

     <RightDatabase>
          <SqlServer>(local)</SqlServer>
          <DatabaseName>AdventureWorks_PROD</DatabaseName>
          <TrustedConnection>true</TrustedConnection>
     </RightDatabase>

     <CommandLineSettings>
          <SchemaScriptFile>script.sql</SchemaScriptFile>
          <SchemaLogFile>log.txt</SchemaLogFile>
          <SchemaWarningsFile>warnings.txt</SchemaWarningsFile>
          <ErrorLogName>error.log</ErrorLogName>
          <CompareSchema Direction="RightAsLeft" Synchronize="false"></CompareSchema>
     </CommandLineSettings>

</CommandLineParameters>

 

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