Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    100

    Unanswered: table comparisons!

    Can anyone point me in the right direction, I need to come up with a way of comparing two different table structures that will proable be on completely different database/server. All I really need is a : table structure is the same=Yes/No answer.

    thanks for any help!

    Nixies

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662

    Wink

    Use SQL-DMO and generate CREATE scripts for both tables. Output them to separate files. After that your window of opportunity just widened, - you can bcp files into 2 tables and do a comparisson using NOT EXISTS or LEFT OUTER JOIN or both, or you can use sp_OAxxx procedures to create FileSystem-based objects and perform comparisson that way, or... Well, it's up to you
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Feb 2003
    Location
    Texas
    Posts
    5

    Thumbs up

    You can go this with the information_schema.columns view. Join the schemas from each database and select where the table=table AND column = column but the datatype info is not the same. If anything comes back, then you know those are the differences.

  4. #4
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    There is some freeware that will do this, it's not that bad.
    SQL Server Compare
    MCDBA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •