An example XML file (with inline descriptive comments) named "Format.xml" is bundled with the product inside the "<product_home>/command_line/XML_templates/" directory which presents details on the various possible tags and syntaxes for configuring the utility to your requirements. The contents of the same is presented below for quick reference.
<?
xml version="
1.0"
encoding="
UTF-8"?>
<!--
A sample XML template document that can be used for Command Line execution.
The document illustrates the usage/configuration of various tags for performing
various DBChangeManager functions through command line.
-->
<!--
The root node <DBChangeManager> has two optional attributes, viz., "sendMail", "outputDir". If these attributes
are defined, the same will be applied to each of the comparison/synchronization projects (defined within the
<schemaCompare> tags) enclosed within this root node.
-->
<DBChangeManager sendMail="true" outputDir="C:\dbcm_cmd_output">
<!--
If you wish to perform multiple comparison/synchronization in a single command line
execution, include multiple <SchemaCompare> tags with appropriate resource details
-->
<SchemaCompare>
<!-- <Operation> tag:
The Operation tag specifies the nature of operation to be performed by the Command line utility. It can be any of the following options:
1. Compare : To compare the given resources
2. SyncScript : To compare and generate the Synchronization script for the given resources
3. Synchronize : To Compare, generate Sync script and subsequently Synchronize the target Resources
The default operation is "SyncScript".
The "sendMail" attribute of this tag can be used to specify if an E-mail has to be sent on
completion of the execution. Default value for this parameter (ie. if left unspecified) is false.
Make sure the "MailerConf.xml" configuration file present under "<product_home>/conf"
directory is configured when using this attribute.
-->
<Operation sendMail="true">SyncScript</Operation>
<!-- <
OutputDir>
tag:
OutputDir tag is used to specify the directory under which the output of the Command Line execution will be output.
A directory with the following naming convention will be created under the configured directory :
"DBCM_CMD_<year_month_day_time>" with the following contents ,
- The comparison reports in HTML format
- Sync Script to be executed for synchronization
- Log files pertaining to the execution
If this tag is not configured or is specified with an invalid path, the utility outputs the contents
under the directory from which the utility is run.
-->
<OutputDir>c:\</OutputDir>
<!--
<Resource1> tag specifies the source resource for comparison.
<Resource2> tag specifies the target resource for comparison (and synchronization).
DBChangeManager supports two types of resources for comparison.
viz., an Online Database or any valid SQL script file.
Hence <Resource1> and <Resource2> tags should be configured with any one of the three
different tag (resource) types for comparison :
For an Online Database use the <Database> tag.
For a SQL Script file use the <Script> tag.
<Database> tag is used to specify the configuration parameters for connecting to an Online database.
The various parameters of the tag include :
host - Name of the host in which SQL Server is running
port - Port in which SQL Server is listening (default is 1433)
database - Name of the database to be compared
auth - Specifies the authentication type to be used for connection. Can have "windows" or "sql" as the value (default is sql).
username - Username to be used for connecting to the database (required only for SQL Server authentication)
password - Password corresponding to the username for connecting to the database (required only for SQL Server authentication)
version - Specifies the SQL Server database version. Can have "2000" or "2005" as its value.
<Script> tag is used to specify the details of the SQL Script file to be used for comparison. Following
parameters are to be specified for this tag :
version - Version of the database, Can have "2000" or "2005" as its value
Apart from the above mentioned parameter, the complete absolute path to the SQL Script file has to be
specified as the value (text node) for this tag.
-->
<Resource1>
<Database database="test_db_dev1" host="server_host" port="1433" username="sa" version="2000" password="pass"/>
<!--Script version="2000">c:\func_multival_table_cnstrnt_1.sql</Script-->
</Resource1>
<Resource2>
<
Database database="test_db_prod"
host="client_mach"
port="1433"
username="sa"
version="2000"
password="pass"/>
<!--Script version="2000">c:\func_multival_table_cnstrnt_2.sql</Script-->
</Resource2>
<!--
The command line utility presents yet another useful feature in the ability to synchronize multiple
database as part of a single execution.
The
<AdditionalTargetResources> tag is used to specify details regarding the other (multiple) Databases (apart from Resource2)
that needs to be synchronized as part of the process. The <AdditionalTargetResources> tag can contain one or more
<Database> tags. The definition for <Database> tag is same as defined above.
Note : The <AdditionalTargetResources> tag is valid only when the operation chosen is "Synchronize".
-->
<!--AdditionalTargetResources>
<Database database="test_db_prod2" host="host_mac3" port="1433" username="sa" version="2000" password="pass"/>
<Database database="test_db_prod3" host="host_mac4" port="1433" username="sa" version="2000" password="pass"/>
<Database database="test_db_prod4" host="host_mac5" port="1433" username="sa" version="2000" password="pass"/>
</AdditionalTargetResources-->
<!--
The <Options> tag defines the various comparison options to be used for Comparison. The Options are
broadly classified as <ComparisonOptions> and <Filters>. As the name suggests, it corresponds to the
various comparison options and object filtering supported by DBChangeManager.
-->
<Options>
<ComparisonOptions>
<!-- The <Ignore> tags defined within <ComparisonOptions> tag is used to specify the various
comparison options for comparison. The various comparison options are listed below for reference-->
<Ignore>TableColumnOrder</Ignore>
<Ignore>Case</Ignore>
<Ignore>WhiteSpace</Ignore>
<Ignore>Comments</Ignore>
<Ignore>ConstraintNames</Ignore>
<Ignore>FileGroups</Ignore>
<Ignore>FullTextIndexes</Ignore>
<Ignore>Permissions</Ignore>
<Ignore>OwnerNames</Ignore>
<Ignore>Bindings</Ignore>
<Ignore>Identity</Ignore>
<Ignore>IndexPadding</Ignore>
<Ignore>Collations</Ignore>
</ComparisonOptions>
<!--
DBChangeManager supports two levels of filtering for comparison.
1. Filtering based on Object type - <TypeFilter> tag
2. Filtering based on Criteria for Object names - <ObjectFilter> tag
-->
<Filter>
<TypeFilter>
<!--
<Type> tag:
The various object type to be EXCLUDED for synchronization are specified using
the <Type> tag as listed below. The value to be specified for the various Object types can
be seen in the list given below.
-->
<Type>Tables</Type>
<Type>Indexes</Type>
<Type>Triggers</Type>
<Type>Views</Type>
<Type>Stored_Procedures</Type>
<Type>Users</Type>
<Type>Roles</Type>
<Type>Rules</Type>
<Type>Defaults</Type>
<Type>USER_DEFINED_TYPES</Type>
<Type>Functions</Type>
<Type>Logins</Type>
<Type>Full_Text_Catalogs</Type>
<Type>Aggregates</Type>
<Type>Assemblies</Type>
<Type>Asymmetric_Keys</Type>
<Type>Certificates</Type>
<Type>Contracts</Type>
<Type>DDL_Triggers</Type>
<Type>Event_Notifications</Type>
<Type>Message_Types</Type>
<Type>Partition_Functions</Type>
<Type>Partition_Schemes</Type>
<Type>Queues</Type>
<Type>Routes</Type>
<Type>Schema</Type>
<Type>Services</Type>
<Type>ServiceBindings</Type>
<Type>Symmetric_Keys</Type>
<Type>Synonyms</Type>
<Type>XML_Schema_Collections</Type>
</TypeFilter>
<!--
The criteria for inclusion of only specific objects for comparison based on their
names is specified using the <ObjectCriteria> tag. Each and every <ObjectCriteria>
should define the <Type> of the object, the <Condition> for matching the criteria
and the <Value>.
The <Type> tag can take any of the values as mentioned above under the <TypeFilter>
section.
The <Condition> tag can have any one of the following as its value :
1. Equals
2. Starts_with
3. Ends_with
4. Contains
5. Does_not_contains
6. Not_equals
The <Value> is used to specify the value for the criteria.
Note : All the <ObjectCriteria>s corresponding to a particular object type with be "AND"ed by default.
In the example given below, we include all Tables (names) that start with letter "a" and
not equal to "ack_1".
-->
<ObjectFilter>
<ObjectCriteria>
<Type>Table</Type>
<Condition>Starts_with</Condition>
<Value>a</Value>
</ObjectCriteria>
<ObjectCriteria>
<Type>Table</Type>
<Condition>Not_equals</Condition>
<Value>ack_1</Value>
</ObjectCriteria>
</ObjectFilter>
</Filter>
<!--
<OwnerMapping> tag:
Various owners defined Resource1 can be mapped any required equivalent owner in Resource2
using the <OwnerMapping> tag. The mapping are specified by defining various <Map> tags which
has "owner1" and its corresponding mapping "owner2" as its attributes.
-->
<OwnerMapping>
<Map owner1="dbo" owner2="dbo"/>
</OwnerMapping>
</Options>
</SchemaCompare>
</DBChangeManager>
The product comes bundled with the cmdLineDBChangeManager.bat batch file under the "<product_home>/bin" directory which takes in the path of XML configuration file as an argument for execution.