Schema Projects
To create a new schema project, select New Schema Project from
the File menu. This will open
the Schema Project dialog where you can enter a project description and
define your source and destination databases. The Schema Project dialog
also allows you to limit the comparison to certain types of database
objects (Tables, Views, Stored Procedures, etc...). The destination
database is the database that you want to change in order to make it identical to the
source database. After comparing the databases, will be able to generate
a synchronization script to render the destination database identical to
the source database.
Once the data project is created, you will see a list of all object
types alongside the total number of objects that are found in both
source and destination databases. The list also indicates the number of
objects that exists only in source or destination. Objects that do not
exist in destination database will be later created by the
synchronization script. Likewise, objects that do not exist in the
source database will be later dropped by the synchronization script.
After saving the project, you can
run the comparison by selecting Compare from the Actions menu. Once the
project have been compared, select Sync Script (Project) from the
Actions menu to generate the SQL script needed to render the destination
database identical to the source database. If you want to exclude or
include a specific object before running the comparison, expand the
project node and navigate to the sub node representing the object type
(Tables, Views, Stored Procedures, etc...).
Synchronizing Database Structure (Schema)
Once the project has been compared, the Sync
Script (Project) item in the Actions menu will be enabled. Select this menu item
to generate the synchronization script that will make the destination
database identical to the source database. If you want to view the
differences between the source and destination databases, navigate to
the node representing each object type and expand it. Note that you
cannot expand these nodes before you run compare. Under each object type
node, you will see five sub nodes:
-
Identical Objects: objects found in both source
and destination databases that are identical. These objects will not
be part of the synchronization script.
-
Alter In Destination: objects found in both source
and destination databases that are different. These objects will be
dropped and recreated in the destination database by the
synchronization script.
-
Create In Destination: objects found only in the
source database. These objects will be created in the destination
database by the synchronization script.
-
Drop From Destination: objects found only in the
destination database. These objects will be dropped from the
destination database by the synchronization script.
- Excluded From Project: objects that are encrypted are not
supported in Teratrax Database Compare. This list also includes DDL
triggers if one database (source or destination) is a SQL Server 2000
database and the other is a SQL Server 2005 database that contains DDL
triggers. DDL triggers are new in SQL Server 2005. They are not
supported in SQL Server 2000. DDL triggers will be included in the
project if both source and destination databases are SQL Server 2005
databases.
The synchronization script should always run on the destination
database to make identical to the source database.
Schema Project Dialog
The Schema Project dialog allows you to create a new schema project or
edit an existing schema project to compare database structural
differences. the following is a list of items in the
dialog:
Description
The description associated with the project acts like
a name to identify the project in the Project Explorer. Descriptions are unique in
the Schema Project node in Project Explorer.
Source Database
- Server: server name or IP address of the SQL Server instance where
the source database resides (For example, ServerName or ServerName\<instance
name> for named instances).
- Windows Authentication: configures Teratrax Database Compare to
connect to the source database using a your Windows user account.
- SQL Server Authentication: configures Teratrax Database Compare to
connect to the source database using a SQL Server login and password.
- Login: the login name used if SQL Server Authentication is
selected.
- Password: the password used if SQL Server Authentication is
selected.
- Database: the source database or master database. Teratrax
Database Compare will examine this database to determine how the
destination database should look like.
To drop down the list of databases using the keyboard, tab into the
database dropdown and press Alt+Down Arrow.
Destination Database
- Server: server name or IP address of the SQL Server instance where
the destination database resides (For example, ServerName or ServerName\<instance
name> for named instances).
- Windows Authentication: configures Teratrax Database Compare to
connect to the destination database using a your Windows user account.
- SQL Server Authentication: configures Teratrax Database Compare to
connect to the destination database using a SQL Server login and password.
- Login: the login name used if SQL Server Authentication is
selected.
- Password: the password used if SQL Server Authentication is
selected.
- Database: the destination database. This is the database that you
want to render identical to the source database.
To drop down the list of databases using the keyboard, tab into the
database dropdown and press Alt+Down Arrow.
Objects Included
The Objects Included pane allows you to limit the object types that
you wish to compare. Object types are Tables, Views, Stored
Procedures, User Defined Functions, DDL Triggers, User Defined Types,
Users, Database Roles, Rules, and Defaults.
|