August 20, 2010 at 9:42 am
I need a suggestion on the best way to compare 2 identical databases.
Here is my scenario:
Database A was the production database until a recent migration to Database B.
Both systems are hosting identical versions of SQL Server 2005, and the only difference is that Database B is a VMWare host.
It was just relayed to me that not all databases from Database A are being used on Database B, for example, one of the databases never had it's associated application modified to point to Database B after the migration, so it's still been running on Database A.
How do I compare the databases on the "Database A" environment to "Database B" to determine which one has the most current databases?
Can I just look at the "Date Modified" on the MDF files?
Any help is appreciated.
August 20, 2010 at 9:56 am
Is it data you need to compare, or database structure? Check out RedGates tool belt, you can get a 14day trial version.
August 20, 2010 at 10:14 am
How come both identical databases will be live on production , how do application connect to databases, your statement is little vague , please clearly mention what things you want to compare database,objects(like table etc) and data etc.
if structure od databases is similar you can easily compare with manual or third party tool, like SQL Compare etc.
HTH ...
August 20, 2010 at 10:20 am
You can't compare dates. Those are when SQL wrote to the file, which I think it does when it opens it, so you're looking at whichever one started later as the "most recent".
Red Gate (my employer) does have a data compare product that can help you determine what the data differences are. If you know what things might change, or want to do all tables, you can see and examine the data.
However this really is a data issue. If you don't have timestamps in your tables, or you can't tell what updates might be made, it's hard to determine which one you want. Ultimately you'd need a business person to make the decision about which data to keep and which to let go.
August 20, 2010 at 10:26 am
ouch; Steve's analysis is right on....it'll be tough to determine what changed and what should be kept, especially if competing applications used two different databases at the same time.
Lesson i learned from this:
I can certainly see this happing in my shop at some point in the future. The retired server should have it's databases put in readonly at the moment of switchover.
the forgotten connection string would have been found faster as a result.
Lowell
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply