Schema comparison

  • Hi,

     

    I like to be able to compare db schema.  Anyone any ideas on how to automate this process and send notification when changes are made.

     

    Thanks

    Bob


    Kindest Regards,

    BJ

  • If you're talking about comparing schema between two databases, there are a bunch of 3rd party comparison tools available.  We just purchased ApexSQL's Diff tool for comparing database objects and it's easy to use and accurate.  You could also check the script section on this site in case someone has a homegrown solution.

    If you mean you want to know when a structural change has been made to a database object, I think you'd have to audit for CREATE, ALTER, and DROP statements.  You can use Profiler or a 3rd party tool.

    Greg

    Greg

  • download toad for sql, trial version for 30 days builtin schema comparison tool...gr8t

  • there are also a few contributions in the scripts section that do a decent job for the price(free).

    search for "Compare" in the "Scripts" section;

    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!

  • Make a cursos for all the tables in sysobjects

    use this query to compare

    SELECT *

    from database1..Information_Schema.COLUMNS

    where Table_Name=@tableName  AND

    Column_Name

    not in (select Column_Name

    from database2..Information_Schema.COLUMNS

    where Table_Name=@tableName)

     

    Pedro R. Lopez
    http://madurosfritos.blogspot.com/[/url]

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

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