ApexSQL Diff Command Line Interface (CLI) switches

Applies to
ApexSQL Diff

Summary
This article explains the ApexSQL Diff CLI switches, and their usage through the examples

Description

Connection switches

/server1Specifies server and instance name of the source SQL instance
Alias: /s1
Format: /server1:server_name[\instance_name]
/server2Specifies server and instance name of the destination SQL instance
Alias: /s2
Format: /server2:server_name[\instance_name]
Quick tip icon

Quick tip:

If a server is not specified “(local)” instance is assumed.

/database1Specifies the name of the source database
Alias: /d1
Format: /database1:SourceDatabaseName
/database2Specifies the name of the destination database
Alias: /d2
Format: /database2:DestinationDatabaseName
/user1Specifies the source login when using SQL Server authentication
Alias: /u1
Format: /user1:sourcelogin
Note: You must use this option together with
the /password1 switch
/user2Specifies the destination login when using SQL Server authentication
Alias: /u2
Format: /user2:destinationlogin
Note: You must use this option together with
the /password2 switch
Quick tip icon

Quick tip:

If a user is not specified a trusted connection is assumed

/password1Specifies the source login’s password when using SQL Server authentication
Alias: /p1
Format: /password1:sourcepassword
Note: You must use this option together with the /user1 switch
/password2Specifies the destination login’s password when using SQL Server authentication
Alias: /p2
Format: /password2:destinationpassword
Note: You must use this option together with the /user2 switch
/backup1Specifies the file name of the source backup
Alias: /b1
Format: /backup1:filepath
/backup2Specifies the file name of the destination backup
Alias: /b2
Format: /backup2:filepath
Quick tip icon

Quick tip:

The full path of a backup file, along with the backup file extension, e.g. .bak, or .trn, has to be defined, so that command could be correct.

/snapshot1Specifies the file name of the source snapshot
Alias: /sn1
Format: /snapshot1:filepath
/snapshot2Specifies the file name of the destination snapshot
Alias: /sn2
Format:/snapshot2:filepath
/sourcecontrol_
folder1
Specifies the path of the local working folder as the source
Alias: /scf1
Format:/sourcecontrol_folder1:filepath
/sourcecontrol_
folder2
Specifies the path of the local working folder as the destination
Alias: /scf2
Format:/sourcecontrol_folder2:filepath
/sourcecontrol_
type1
Specifies the source control system to be compared as the source:

  • git
  • mercurial
  • perforce
  • subversion
  • teamfoundationserver

Alias: /sct1
Format:/sourcecontrol_type1:sc_type
Note: These arguments can’t be combined

/sourcecontrol_
type2
Specifies the source control system to be compared as the destination:

  • git
  • mercurial
  • perforce
  • subversion
  • teamfoundationserver

Alias: /sct2
Format:/sourcecontrol_type2:sc_type
Note: These arguments can’t be combined

/sourcecontrol_
server1
Specifies the name of the source control server used as the source (TFS server, Perforce host)

Alias: /scs1
Format:/sourcecontrol_server1:server_name

/sourcecontrol_
server2
Specifies the name of the source control server used as the destination (TFS server, Perforce host)

Alias: /scs2
Format:/sourcecontrol_server2:server_name

/sourcecontrol_
user1
The login used to connect to the source control server used as the source

Alias: /scu1
Format:/sourcecontrol_user1:sourcelogin

/sourcecontrol_
user2
The login used to connect to the source control server used as the destination

Alias: /scu2
Format:/sourcecontrol_user2:destinationlogin

/sourcecontrol_
password1
Specifies the password for the login used as the source /sourcecontrol_user1

Alias: /scp1
Format:/sourcecontrol_password1:
sourcepassword

/sourcecontrol_
password2
Specifies the password for the login used as the destination/sourcecontrol_user2

Alias: /scp2
Format:/sourcecontrol_password2:
destinationpassword

/sourcecontrol_
repository1
Specifies the repository of the source control server used as the source (Git, Mercurial, Subversion repository, Perforce depot)

Alias: /scr1
Format:/sourcecontrol_repository1:
<protocol>://<hostname>:<portnumber>/<git_server_name>/<repository>
(example for Git repository)

Format:/sourcecontrol_repository1:
<protocol>://<hostname>:<portnumber>/<repository>/
(example for Mercurial repository)

Format:/sourcecontrol_repository1:
<protocol>://<hostname>:<portnumber>/svn/<repository>/
(example for Subversion repository)

/sourcecontrol_
repository2
Specifies the repository of the source control server used as the destination (Git, Mercurial, Subversion repository, Perforce depot)

Alias: /scr2
Format:/sourcecontrol_repository2:
<protocol>://<hostname>:<portnumber>/<git_server_name>/<repository>
(example for Git repository)

Format:/sourcecontrol_repository2:
<protocol>://<hostname>:<portnumber>/<repository>
(example for Mercurial repository)

Format:/sourcecontrol_repository2:
<protocol>://<hostname>:<portnumber>/svn/<repository>/
(example for Subversion repository)

/sourcecontrol_
branch1
Specified the branch name for the Git source control type used as the source (“master” if omitted)

Alias: /scb1
Format:/sourcecontrol_branch1:branchname

/sourcecontrol_
branch2
Specified the branch name for the Git source control type used as the destination (“master” if omitted)

Alias: /scb2
Format:/sourcecontrol_branch2:branchname

/sourcecontrol_
project1
Project path containing script files on the source control server used as the source (Git, Mercurial, Subversion, TFS folder, Perforce workspace)

Alias: /scj1
Format:/sourcecontrol_project1:$/ProjectName

/sourcecontrol_
project2
Project path containing script files on the source control server used as the destination (Git, Mercurial, Subversion, TFS folder, Perforce workspace)

Alias: /scj2
Format:/sourcecontrol_project2:$/ProjectName

/get_sources_by_
label_1
Gets the script files from the source control used as the comparison source by label

Alias: /scl1
Format:/get_sources_by_label_1:label
Note: Omitting this switch will result in getting the latest label

/get_sources_by_
label_2
Gets the script files from the source control used as the comparison destination by label

Alias: /scl2
Format:/get_sources_by_label_2:label
Note: Omitting this switch will result in getting the latest label

/script_folder1Specifies the path of the script folder to be used as the source

Alias: /sf1
Format:/script_folder1:filepath

/script_folder2Specifies the path of the script folder to be used as the destination

Alias: /sf2
Format:/script_folder2:filepath

/collation1Specifies the SQL compatibility level of the scripts in the source script folder or source control

Alias: /c1
Default: SQL_Latin1_General_CP1_CI_AS
Format:/collation1:collation_constant

/collation2Specifies the SQL compatibility level of the scripts in the destination script folder or source control

Alias: /c2
Default:SQL_Latin1_General_CP1_CI_AS
Format:/collation2:collation_constant

/compatibility_
level1
Specifies the SQL compatibility level of the scripts in the source script folder or source control:

  • SQL2005 [2005]
  • SQL2008 [2008]
  • SQL2012 [2012]
  • SQL2014 [2014]
  • SQL2016 [2016]

Alias: /cl1
Format:/compatibility_level1:[2005|2008|2012|2014|2016]
Note: These arguments can’t be combined

/compatibility_
level2
Specifies the SQL compatibility level of the scripts in the destination script folder or source control:

  • SQL2005 [2005]
  • SQL2008 [2008]
  • SQL2012 [2012]
  • SQL2014 [2014]
  • SQL2016 [2016]

Alias: /cl2
Format:/compatibility_level2:[2005|2008|2012|2014|2016]
Note: These arguments can’t be combined

Specific switches

/projectSpecifies a project file path
Alias: /pr
Format: /project:project.axds

Quick tip icon

Quick tip:

If a project file is saved outside of the current directory, specify the path where it’s located.

/exportSpecifies exporting a live database to a snapshot, a script folder, or source control project
Alias: /ex
Format: /d1:SourceDB /sn1:C:\snapshot.axsnp /ex

/output_typeSpecifies the primary output format of the comparison results, synchronization script, or executable packages (SQL if omitted):

  • sql [s] – SQL sync script
  • html [h] – HTML report
  • html_simple [hs] – simple HTML report
  • html_schema_source [hss] – HTML schema report of source objects
  • html_schema_destination [hsd] – HTML schema report of destination objects
  • xml [x] – XML export
  • excel [e] – Excel report
  • csharp [cs] – C# solution
  • net_executable [ne] – Executable installer

Alias: /ot
Format: /output_type:[s|h|hs|hss|hsd|x|e|cs|ne]
Note: These arguments can’t be combined

/output_type2Specifies the secondary output format of the comparison results, synchronization script, or executable packages (SQL if omitted):

  • sql [s] – SQL sync script
  • html [h] – HTML report
  • html_simple [hs] – simple HTML report
  • html_schema_source [hss] – HTML schema report of source objects
  • html_schema_destination [hsd] – HTML schema report of destination objects
  • xml [x] – XML export
  • excel [e] – Excel report
  • csharp [cs] – C# solution
  • net_executable [ne] – Executable installer

Alias: /ot2
Format: /output_type:[s|h|hs|hss|hsd|x|e|cs|ne]
Note: These arguments can’t be combined

/output_nameSpecifies the primary output name/folder path of the comparison results, synchronization script or executable packages.
Alias: /on
Format: /output_name:C:\Projects\sync.sql
/output_name2Specifies the secondary output name/folder path of the comparison results, synchronization script or executable packages.
Alias: /on2
Format: /output_name2:C:\Projects\sync.sql
Quick tip icon

Quick tip:

If an output file name is not specified, assumed names are:

  • sync.sql for SQL output format
  • report.html for HTML output format
  • report_simple.html for HTML simple output format
  • source_report.html for HTML schema source output format
  • destination_report.html for HTML schema destination output format
  • XML_schema_difference_report.xml for XML output format
  • excel_report.xml for Excel output format
  • servername.databasename.exe for Executable installer output format
  • servername.databasename for C# solution output format

/objects_to_
synchronize
Specifies the objects to be synchronized based on their comparison status:

  • Missing [m]
  • Additional [a]
  • Different [d]
  • Default [dft] – Missing, additional, and different objects will be synchronized

Alias: /ots
Format: /ots:[a|m|d|dft]
Note: These arguments can be combined with each other except for
Default
Omitting this switch will result in in synchronizing missing, additional, and different objects

/includeIncludes specific objects into the comparison and synchronization process. Objects can be specified by first specifying a bitwise set and a regular expression.
Multiple includes can be specified with spaces in between.
Alias: /inc
Format: /include:bitwise_constant:
regular expression

/excludeExcludes specific objects from the comparison and synchronization process. Objects can be specified by first specifying a bitwise set and a regular expression.
Multiple excludes can be specified with spaces in between.
The /exclude switch is processed after the /include switch (if it is specified)
Alias: /exc
Format: /exclude:bitwise_constant:
regular expression

/ignore_project_
object_selection
Ignore object selection specified in the project file
Alias: /ipos
Format: /ignore_project_object_selection

/folders_mapping1

Specifies the path to an XML file containing the folder mapping settings for source data source

Alias: /fm1
Format: /folders_mapping1:filepath

/folders_mapping2

Specifies the path to an XML file containing the folder mapping settings for destination data source

Alias: /fm2
Format: /folders_mapping2:filepath

/authorSpecifies the name of the author of the report, or the synchronization script

Alias: /auth
Format: /author:John Doe

/legalSpecifies legal (company) information

Alias: /leg
Format: /leg:© ApexSQL 2016

General synchronization options switches

/encodingSpecifies the output file encoding:

  • ANSI [a]
  • Unicode [u]
  • UTF7 [u7]
  • UTF8 [u8]

Alias: /enc
Format: /encoding:[a|u|u7|u8]
Note: These arguments can’t be combined

Quick tip icon

Quick tip:

If no output encoding was specified, Unicode encoding is assumed.

/synchronizeExecutes the synchronization script

Alias: /sync
Format: /synchronize

/backupAllows providing the path for the destination backup to be saved to a specific location, or included in the synchronization script:

  • None [n] – Prevents the backup from being created
  • Default [dft] – Saves the backup in the installation directory

Alias: /bu
Format: /backup:[Default|None|”C:\path_to_backup”]
Note: These arguments can’t be combined
Omitting this switch will result in the destination backup being created in the installation directory

Quick tip icon

Quick tip:

The switch /backup should be used along with the switch /synchronize

/sync_optionsSpecifies the general synchronization options:

  • None [n] – Sets all options to off
  • DestinationToSource [dts] – Treats the specified comparison source as the destination and vice versa
  • Default [dft] – Uses the default settings

Alias: /so
Format: /sync_options:set_of_options_
delimited_by_space

Note: These arguments can be combined with each other except for None and Default
Omitting this switch will result in the default settings being used

/script_formatSpecifies the script formatting options:

  • None [n] – Sets all options to off
  • Script header [sh] – Includes the script header
  • Comments [cmt] – Includes automatically generated comments in the synchronization script
  • PrintStatements [ps] – Includes automatically generated PRINT statements used to display information on the currently executed operation to the synchronization script
  • Default [dft] – Uses the default settings

Alias: /sf
Format: /script_format:set_of_options_
delimited_by_space

Note: These arguments can be combined with each other except for None and Default
Omitting this switch will result in the default settings being used

/sourcecontrol_sync_
comments
Specifies the synchronization comments

Alias: /scsc
Format: /sourcecontrol_sync_comments:
comments

/sourcecontrol_sync_
label
Specifies the synchronization label

Alias: /scsl
Format: /sourcecontrol_sync_label:label

/prescript_file_pathSpecifies the pre-processing script file path
None [n] – Sets value to none

Alias: /prefp
Format: /prescript_file_path:path_to_script_file

/postcript_file_pathSpecifies the post-processing script file path
None [n] – Sets value to none
Alias: /postfp
Format: /postscript_file_path:path_to_script_file
/snapshot_file_pathSpecifies the file path of a snapshot file with scripts that should be created if script folder or source control project is used as the destination:
None [n] – Sets value to none
Alias: /snfp
Format: /snapshot_file_path:
path_to_snapshot_file

Omitting this switch will create no snapshot file
/warnings_handlingSpecifies warnings handling before the application execution:

  • IgnoreWarnings [iw] – Warnings will be ignored during the application execution
  • AbortOnMediumOrHighWarnings [amh] – Application execution will be aborted on medium or high warnings
  • AbortOnHighWarnings [ah] – Application execution will be aborted only on high warnings
  • Default [dft] – Sets the IgnoreWarnings argument

Alias: /wh
Format: /warnings_handling:
Note: These arguments cannot be combined.

/exclude_
recomparison_
summary
Exclude source recomparison and synchronization summary after the synchronization process

Alias: /erss
Format: /exclude_recomparison_summary

Structure comparison switches

/owners_mappingSpecifies the path to the file containing the schema mappings

Alias: /om
Format: /owners_mapping:
owners_mapping_file_path

/associate_columnsSpecifies the degree of column names similarity for matching, a percentage value, or:

  • Default [dft] – Uses the default setting
  • None [n] – Sets value to none

Alias: /ac
Format: /associate_columns:degree_of_
similarity_columns_in_percent|d|n

/ignore_generalSpecifies the following difference ignoring options:

  • None [n]
  • IgnoreANSIOption [iao]
  • IgnoreAuthorization [iau]
  • IgnoreBoundRulesAndDefaults [ibrd]
  • IgnoreCase [ic]
  • IgnoreCaseInNames [icin]
  • IgnoreComments [icm]
  • IgnoreDatabaseExtendedProperties [idep]
  • IgnoreExtendedProperties [iep]
  • IgnoreInvalidObjects [iio]
  • IgnoreNewObjects [ino]
  • IgnorePermissions [ip]
  • IgnoreReplicationTriggers [irt]
  • IgnoreServerAndDatabaseInSynonyms [isds]
  • IgnoreSystemObjects [iso]
  • IgnoreTriggerOrder [ito]
  • IgnoreWhiteSpace [iws]
  • IgnoreWithEncryption [iwe]
  • Default [dft] – combination of IgnoreCase, IgnoreDatabaseExtendedProperties, IgnoreInvalidObjects, IgnoreSystemObjects, and IgnoreWhiteSpace options

Alias: /ig
Format: /ignore_general:set_of_the_
options_delimited_by_space

Note: These arguments can be combined with each other except for None and Default
Omitting this switch will result in using the default settings

/ignore_table_
attributes
Specifies the following table attribute ignoring options:

  • None [n]
  • IgnoreChangeTracking [ict]
  • IgnoreCheckDefaultConstraints [icdc]
  • IgnoreCollations [iclt]
  • IgnoreColumnOrder [ico]
  • IgnoreConstraintNames [icn]
  • IgnoreFillfactor [ifc]
  • IgnoreFilegroups [ifd]
  • IgnoreForeignKeys [ifk]
  • IgnoreForeignKeysActions [ifka]
  • IgnoreFullTextIndexes [ifti]
  • IgnoreIdentity [iid]
  • IgnoreIdentitySeedAndIncrement [iisi]
  • IgnoreIndexes [ii]
  • IgnoreIndexesNames [iin]
  • IgnoreIndexLock [ipl]
  • IgnoreIndexSortOrder [iiso]
  • IgnoreNextFileGroups [infg]
  • IgnoreNotForReplication [infr]
  • IgnorePrimaryKeys [ipk]
  • IgnoreSecondaryAttributes [iaic]
  • IgnoreStatistics [is]
  • IgnoreUniqueConstraints [iuc]
  • IgnoreUserDefinedDatatypes [iut]
  • IgnoreWithNoCheck [iwnc]
  • Default [dft] – combination of IgnoreColumnOrder, IgnoreFilegroups and IgnoreFillfactor options

Alias: /ita
Format: /ignore_table_attributes:
set_of_the_options_
delimited_by_space

Note: These arguments can be combined with each other except for None and Default
Omitting this switch will result in using the default settings

/ignore_parsing_
errors
Ignore parsing errors during the comparison process

Alias: /ipe
Format: ignore_parsing_errors

Structure synchronization switches

/manage_ownersSpecifies the following options for schema scripting:

  • None [n] – Uses the default settings
  • ExcludeAlways [ea]
  • ExcludeNotConnectedUser [encu]
  • ExcludeNotDatabaseOwner [endo]
  • Include [i]

Alias: /mo
Format: /manage_owners:one_
option_from_the_set

Note: These arguments cannot be combined

/struct_sync_
options
Specifies the synchronization script’s structure and scope:

  • None [n]
  • AddWithEncryption [awe]
  • CheckForObjectExistence [cfoe]
  • DisableDDLTriggers [ddt]
  • IncludeDependentDatabaseObjects [iddo]
  • IncludeTransactionHandling [ith]
  • ScriptUseDatabase [sud]
  • UseDROPandCREATE [udc]
  • UseDropAndCreateTables [udct]
  • Default [dft] – combination of IncludeTransactionHandling, IncludeDependentDatabaseObjects and ScriptUseDatabase options

Alias: /sso
Format: /struct_sync_options:
set_of_options_delimited_by_space

Note: These arguments can be combined with each other except for None and Default

Structure reporting switches

/html_report_
options
Set of primary HTML report options:

  • Equal [e]
  • Different [d]
  • Source [s]
  • Destination [t]
  • CheckedOnly [co]
  • IncludeScripts [is]
  • Default [dft] – combination of Equal, Different, Source and Destination options

Alias: /hro
Format: /html_report_options:[e|d|s|t|co|is]
Note: These arguments can be combined.

/html_report_
options2
Set of secondary HTML report options:

  • Equal [e]
  • Different [d]
  • Source [s]
  • Destination [t]
  • CheckedOnly [co]
  • IncludeScripts [is]
  • Default [dft] – combination of Equal, Different, Source and Destination options

Alias: /hro2
Format: /html_report_options2:[e|d|s|t|co|is]
Note: These arguments can be combined.

/html_schema_
report_options
Set of primary HTML schema (source and destination) report options:

  • Equal [e]
  • Different [d]
  • Source [s]
  • Destination [t]
  • CheckedOnly [co]
  • IncludeScripts [is]
  • Default [dft] – combination of Equal, Different, Source and Destination options

Alias: /hsro
Format: /html_schema_report_options:[e|d|s|t|co|is]
Note: These arguments can be combined.

/html_schema_
report_options2
Set of secondary HTML schema (source and destination) report options:

  • Equal [e]
  • Different [d]
  • Source [s]
  • Destination [t]
  • CheckedOnly [co]
  • IncludeScripts [is]
  • Default [dft] – combination of Equal, Different, Source and Destination options

Alias: /hsro2
Format: /html_schema_report_options2:[e|d|s|t|co|is]
Note: These arguments can be combined.

/excel_report_
options
A set of primary Excel report options:

  • Equal [e]
  • Different [d]
  • Source [s]
  • Destination [t]
  • CheckedOnly [co]
  • IncludeScripts [is]
  • Default [dft] – combination of Equal, Different, Source and Destination options

Alias: /ero
Format: /excel_report_options:[e|d|s|t|co|is]
Note: These arguments can be combined.

/excel_report_
options2
A set of secondary Excel report options:

  • Equal [e]
  • Different [d]
  • Source [s]
  • Destination [t]
  • CheckedOnly [co]
  • IncludeScripts [is]
  • Default [dft] – combination of Equal, Different, Source and Destination options

Alias: /ero2
Format: /excel_report_options2:[e|d|s|t|co|is]
Note: These arguments can be combined.

Package switches

/package_
compression
Reduces the size of the resulting executable by using compression

Alias: /pkcm
Format: /package_compression

/package_errorSets the package error handling (“ask” if omitted):

  • Abort – package execution is aborted and all changes are rolled back
  • Ignore – all errors are ignored during the package execution
  • Ask – user confirmation is required for each encountered error, whether to abort or continue the package execution

Alias: /pke
Format: /package_error:[Abort|Ignore|Ask]
Note: These arguments cannot be combined.

/package_authorPlaces the author tag into the about box of the package.

Alias: /pkaa
Format: /package_author:Author_name

/package_companyPlaces the company tag into the about box of the package.

Alias: /pkca
Format: /package_company:Company_name

/package_legalPlaces the legal tag into the about box of the package

Alias: /pkal
Format: /package_comments:Comments

/vs_verSets package Visual Studio version (“VS2015” if omitted):

  • VS2005
  • VS2008
  • VS2010
  • VS2012
  • VS2013
  • VS2015

Alias: /vsv
Format: /vs_ver:[VS2005|VS2008|VS2010|VS2012| VS2013|VS2015]
Note: These arguments cannot be combined.

/indicate_
default_db
Sets the default database the generated package should be executed against.

Alias: /ddb
Format: /indicate_
default_db:Database_name

/create_mfsCreates a manifest file that contains the information regarding OS compatibility versions and sets the Windows user account control level to allow the application to run without any additional permissions.

Alias: /cmf

/create_datCreates a .dat file which contains SQL code for creating new or updating the existing database.

Alias: /cdf

/create_comCreates a CLI (Command Line Interface) executable for package.

Alias: /ccf

/run_exe_nowRuns the created executable installer immediately upon generating.

Alias: /ren

/open_in_vsOpens the generated C# solution in Visual Studio upon creation.

Alias: /ovs

Learn more about additional switches from the article on this link.

Return codes

ApexSQL applications have two groups of return error codes:

  1. Common return error codes – learn more about these from here

  2. Specific return error codes – for ApexSQL Diff it’s the:

    102 – The output file creating failed

Examples

Note: All examples assume that the current directory is the application directory. If not, the full path to ApexSQLDiff.com must be specified.

Compare the structure of two local databases:

ApexSQLDiff.com /d1:AdventureWorks2008 /d2:AdventureWorks2012

Compare the structure of two databases on different servers:

ApexSQLDiff.com /s1:SourceServer /d1:AdventureWorks2008 /s2:DestinationServer /d2:AdventureWorks2012

Compare the structure of two databases on different servers using SQL Server authentication:

ApexSQLDiff.com /s1:SourceServer /d1:AdventureWorks2008 /u1:SourceMaster /p1:passtopass /s2:DestinationServer /d2:AdventureWorks2012 /u2:DestinationChange /p2:changes

Compare the structure between a snapshot and source control, define collation and compatibility level:

ApexSQLDiff.com /sn1:C:\Projects\SourceSnapshot.snp /scf2:C:\temp\SC /sct2:teamfoundationserver /scs2:DestinationServerName /scu2:DestSourceControlUser /scp2:dscupass /scr2:C:\Projects\Repository /c2: SQL_Latin1_General_CP1_CI_AS /cl2:2014

Compare the structure between a database backup and a script folder, define collation and compatibility level:

ApexSQLDiff.com /b1:C:\Projects\SourceBackup.bak /sf2:C:\Projects\DestinationScript /c2: SQL_Latin1_General_CP1_CI_AS /cl2:2014

Using a project file, overriding the destination username and password with switches, and specifying the path to the synchronization script:

ApexSQLDiff.com /pr:SynchProject.axds /u2:UserChanges /p2:passiton /on:C:\Projects\SynchScript.sql

Using an argument file, e.g. “argfile.xml”, to execute commands:

ApexSQLDiff.com /argfile:argfile.xml

Compare the structure between views which are named “Resources” on different servers, using SQL Server authentication, set the ignore table attributes options, specify xml as output type, specify the path of the comparison report, backup the destination database, synchronize, and display all messages on the processed operation:

ApexSQLDiff.com /s1:SourceServer /d1:AdventureWorks2008 /u1:SourceMaster /p1:passtopass /s2:DestinationServer /d2:AdventureWorks2012 /u2:DestinationChange /p2:changes /inc:4:^Resources$ /ita:ico ifd is iisi ifti /on:C:\Projects\Export.xml /ot:xml /bu:C:\Projects\Backups /sync /v

Compare the structure between a script folder with defined collation and compatibility level and a database using SQL Server authentication, set structure synchronization options, set general ignore options, display all messages on the processed operation, specify the path of the synchronization script, set structure of html report options, display all messages on the processed operation, and overwrite the existing synchronization script:

ApexSQLDiff.com /sf1:C:\Projects\DestinationScript /c1: SQL_Latin1_General_CP1_CI_AS /cl1:2014 /s2:DestinationServer /d2:AdventureWorks2012 /u2:DestinationChange /p2:changes /sso:iddo cfoe /ig:ip ic iep icm /of:C:\Projects\SynchScript.sql /shtmo:i s coo /v /f