Providing Comparison Resources
After invoking the new
comparison screen , providing the appropriate resources to be
compared is the next step. DBChangeManager supports 2 types of
comparison resources as discussed under Resources for Schema Comparison
section which includes Live Databases and SQL Script files. You could
provide any of these resources for doing the comparison. Two valid SQL
Server database resources are required for doing a schema comparison,
labeled hereafter as Resource 1 and Resource 2.
Providing Live Databases
If you are going to compare a live SQL Server database, Click on
the 'Database' tab in the 'New Comparison' screen. Provide the
following connectivity details:
- Server: Provide the Machine name (Host name)
in which the SQL Server live database is running. If the SQL Server
instance is running a Port other than 1433, specify the same along with
the Machine name and a colon. e.g.
<machine_name>:<port_number>. Instance name if any can be
specified in <machine_name>\<instance_name> format.
- Connection Settings: You can login to the SQL
Server database either with Windows Authentication or SQL
Server Authentication. Choose the appropriate radio button
based on the authentication type that you want to use.
- SQL Server Authentication (default): If you choose SQL
Server authentication then provide the appropriate SQL Server user name
and password to login. You cannot use this option if you do not have a
separate SQL Server login account present in the database. (Refer
SQL Server manual to know about creating a separate SQL Server login)
- Windows Authentication: If you choose Windows
authentication, DBChangeManager would use the credentials of the
machine in which the DBChangeManager Server is running and would pass
it to the SQL Server for authentication. The machine in which
DBChangeManager Server is running should have a windows authentication
account in the SQL Server database that is to be connected for
successful login.
- Test Connection: Once you choose the appropriate
authentication type and have provided the required details, click on
'Test Connection' to test whether DBChangeManager server could connect
to the SQL Server database with the provided connection details. If
there is an error in connection you will be appropriately notified
about it. You need a valid database connection to further proceed with
the comparison.
- Database: Choose/Type the SQL Server database
that is to be compared in the 'Database' field. You could fetch the
existing databases present in the machine by clicking on the 'Refresh'
link.
If you had already used some
databases as a resource it will be listed under the 'Registered
Database' area
on the left. You could drag and drop any of the the listed registered
databases to the right for autofilling under either Resource 1 or
Resource 2.

Providing Script file
If you have your schema objects definitions available in SQL Server
SQL script files you can choose this option. The Script files could
have been hand written residing in the System or which were exported
from the database using the "Export Database" utility. Click
on the 'Script' tab in the 'New Comparison' screen and provide
the following details:
- Script File: Choose the script file that is to
be compared, present in your local machine, using the 'Browse' option.
The Script file could be in any one of the following formats:
- A Single SQL File : If the database Schema
to be compared, resides in a single SQL Script file in text format, you
can browse and load the same as such for comparison
- A Database Folder : This option should be
used in connection with the "Export Database" utility. When you export
a live database into "Multiple SQL Script Files", DBChangeManager
outputs the exported content into multiple files (one file per database
object) in a pre-defined folder structure. Folders are created for
grouping the various objects based on its type (for example, all table
object definitions are exported as files under "Tables" folder). Along
with the object definition, a meta-data file named after the database
name with .dbinfo extension is also generated in the
root folder where the export is done. You should browse and
specify this .dbinfo for comparison if you wish to
load all the exported script files in various directories for
comparison. Refer "Export
Database" to know more
- A Zip file : This option also works only in
connection with the "Export Database" utility. When you choose to save
the exported contents in a different location or machine using the
"Export Database" utility, the tool outputs a Zip file which is a Zip
of all the exported contents (as
folders and files in the same format as described above #2).
Once you save, extract and make modifications to the scripts, you can
Zip the files and folders in the same format and load it for
comparison. This option is more useful when you are working from a
machine which is different from the one that is running the
DBChangeManager server. Refer
"Export Database" to know more
Important
Note: The script file could contain the definitions of any
number of schema objects all separated with a GO SQL Server delimiter
statement. Even if you have a single object definition it should
contain a GO statement at the end.

Comparison Combination
You can compare any resource type against any other i.e. A live
database could be compared against script files, and similarly we could
have any resource combinations used for comparison.
Once you specify the required comparison resource, next you could set
the necessary comparison
options discussed in the next chapter.
Copyright © 2008, AdventNet Inc. All Rights Reserved.