Comparing 2 identical database servers.

  • 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.

  • Is it data you need to compare, or database structure? Check out RedGates tool belt, you can get a 14day trial version.

  • 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 ...

  • 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.

    http://www.red-gate.com/products/SQL_Data_Compare/index.htm

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply