DB SynchroComp Synchronizes SQL Server Databases
DB SynchroComp detects the differences between two SQL Server database schemas and generates script to match structure of these schemas. At the same time maintains all data integrity in the database that is subject of synchronization
e-dule Software has released DB SynchroComp v. 2.2.0, a tool for Microsoft SQL Server 7.0 and higher that compares and synchronizes two database schemas.
If you have two databases, one in use, and the other for developing purpose, you need them to be the same almost all the time. This can be hard job if you try to do it manually, and who knows how many mistakes you can make. DB SynchroComp can do this job for you.
DB SynchroComp compares two databases, determining differences between them, and generates script that will change target database structure to match the source database structure. After you execute synchronization script, two databases will have the same structure, and existing data in the target database will remain intact.
Database differences are shown graphically and in text. There is the possibility to select objects that are to be synchronized or to synchronize all objects (this is the default option). You can change some of the comparison options before comparing databases. After creating synchronization script, it is possible to change it. Usually, there is no need for changing this script.
DB SynchroComp changes database structure only, not the data. You can not use DB SynchroComp to synchronize data in two databases. After synchronization of database schemas, target tables will be populated with data that existed on the target database before synchronization, except for newly created fields that can be either null, or populated with some default data that is generated by program or by the user.
Steps to Synchronized Databases
The first step in synchronizing databases is to connect to them. When you run the program, a connection dialog box is opened, offering you to connect to the source and target databases. You can do this later, if you select Connect option from the menu. The source database is the database that is read-only in this case, that is, the database that has preferred structure. The target database is the database that is to be synchronized with the source database. You can connect to any MS SQL Server that is available on your network. First you choose server name, and than database name, from the list of available databases on the chosen server. You have the ability to logically organize servers into tree list, so you can easily manage your connections. DB SynchroComp remembers all your previous connections, so if you want, you can choose to do comparison based on the parameters from your previous comparison. You must have access rights for all relevant database objects in both databases. If you don't have right to create some object in target database, you want be able to select it in the list of database objects that are to be synchronized, nor will be the script created for that object.
After you connect to databases, DB SynchroComp will compare the two databases and show all differences. By default, the main program window is divided into three parts. The first one, called the "Differences view," shows objects that are different in two databases. Objects that differ are presented hierarchically, showing dependencies between objects (for example, primary key is the child node of the table object). If two objects exist in both databases, but are not the same, they are colored in blue. Otherwise, if object exists only in one database, that row is colored in red. Two other parts of the main program windows are used to show SQL script for creating object in source and target database.
If you wish, you can change comparing options, and compare again. This comparison is done using cached data, so it is much faster. When you are satisfied with comparing results, you can generate synchronization script. It is possible to make this script for selected objects only, or for entire database.
The synchronization script is displayed in editor, which has syntax highlighting that is exactly the same as Microsoft Query Analyzer. There is no syntax checking before script execution. Hence, although it is possible to type everything you imagine into script, script changing is not recommended if you are not sure that you completely understood it.
After the synchronization script is generated, you can execute it. It is executed in transaction, so if something goes wrong, your database will be restored in the state before script execution.
DB SynchroComp does nothing with the existing data. All the data that were in target database are still there in target table columns, unchanged. DB SynchroComp changes only database schema, not data. Only cases when data is changed are when creating new field, or changing field type. If new column must not contain null values, is a part of primary key, and default value is not defined, identity value is inserted into that column. This identity value is first generated like integer identity value, and then converted to underlying column type. Using new fields editor, user can change this default value by inserting SQL script that will generate values for that column.
Some Extra Features
Comparison is done on an object basis. This means that all things regarding to some database object (indices, collation order, white spaces, etc.) are taken in mind when comparison is done. There is the possibility to change default comparison options. It is possible to compare only some type of database objects. When you compare stored procedures or functions, you can exclude comparing white spaces or comments.
Collation order is a novelty introduced in MS SQL Server 2000 version. For that reason, when you compare two databases from which one is MS SQL Server 7 and the other is MS SQL 2000, comparing of collation order is excluded.
Because of the possibly inaccurate sysdepends system table, DB SynchroComp has its own algorithm for determining dependent objects. That makes database schema more accurate, and enables correct creation of objects in target database. DB SynchroComp does not affect sysdepends table in any way.
DB SynchroComp is aware of objects created with schema binding option and knows how to handle them.
There are some considerations regarding functions and stored procedures. These database objects can be logically the same, but have some white space or comment mark that makes them different. There is option to exclude white spaces or comment marks from comparing, so only semantically important differences are established. Further on, there can be a problem with different collation order by which some columns are created. If two char columns are created with different collation order, joining tables through these columns leads to errors. If stored procedure or function contains such joins, even if both procedures are exactly the same, DB SynchroComp will raise an error when attempting to create that stored procedure on target database. Stored procedures with the same names are handled appropriately.
You probably tried to change ordinary type of some user defined type and find that it is impossible until you delete all references to that type. This can be quite exhaustive job. DB SynchroComp can't help you to solve this problem on a source database. However, using DB SynchroComp, you can easily solve this problem on target database, since all changes made to source database are made to target database too.
If, for some reason, you need your target database to be created in the same file groups like the source database, you can check option to include file groups in script. In that case you have to clarify what you mean by 'the same file group'. This can mean that file groups have the same name, logical names of files are the same, or logical and physical names are the same.
Summary
If you are looking for a good and reliable tool that will help you manage your MS SQL Server database work, try DB SynchroComp. This is not a tool that replaces Microsoft Query Analyzer, or any other Microsoft tool. It is not a tool for data manipulation either. It is designed with aim in helping database administrators and modellers to keep two database structures synchronized.
For Further Information
support@e-dule.com
www.e-dule.com
|