SQL Server Database Comparison and Synchronization

April 18th, 2007 Comments off
SQL Server

Since database are usually designed in development environments, migrating changes over to other environments (e.g. QA and production) is not a trivial task.  This is because SQL Server does not have any built-in tools to compare database schemas. 

There are quite a few third-party tools that would make your life easier, most notably, Red Gate’s SQL Compare (reasonably priced around $300).

At times, buying a commercial tool is not really an option, so one must resort to googling for free tools.  There are three such tools that I am aware of:

  1. SQLDBDiff by SQLDBTools
    A very decent tool that comes in both freeware and shareware versions.  Freeware version is not badly crippled; only advanced features such as multi-database comparison, data content comparison, etc. are disabled.

  2. Database Schema Comparison Utility
    This is a Code Project article that comes with C# source code of a schema comparison utility.  The utility itself is pretty bare-bone, but gets the job done.
  3. StarInix Free Database Compare 2.0
    I have not used this tool, but from the advertised feature list, it looks pretty good.  Most notably, in addition to SQL Server, this tool works with Access and MySQL databases.

Cloned Virtual Machine on Domain

August 18th, 2006 Comments off

One thing I figured while cloning a VHD is that when you start the cloned VM for the first time, make sure that you do not log on to the domain. Logon to the local machine first and run NEWSID to rename the computer and assign it a new SID. Failure to do so creates multiple entries in the Active Directory with the same NETBIOS name, and you may not be able to logon to the domain from the original VPC. If that occurs, however, the remedy is to remove both machines from the domain, and then join the domain again one machine at a time (i.e. after renaming the second machine and assigning it a new SID).

Command Prompt Explorer Bar

August 17th, 2006 Comments off

I came across this great time-saver tool called Command Prompt Explorer Bar that allows you to display command prompt window within Windows Explorer, with it’s current directory already set to the path you are browsing in the Explorer. It also has some neat little features such as a script menu that allows you to run particular applications passing the selected file as a parameter etc.

Microsoft LogParser

August 15th, 2006 Comments off

It’s kind of ironic that soon after I finished writing a log viewer for my log4Net XML logs, I came across this universal log parsing tool by Microsoft called Log Parser 2.2. I started playing with it and it seems pretty good at what it does. You can create nice looking HTML reports and even charts from your log data (xml, csv, tsv, active directory objects, registry, etc.). All it takes is some basic SQL skills, and you are on your way to producing meaningful views / reports out of your log files. The beauty of the tool is in its extensibility; you can parse an array of data types using this tool.