Ask a questionAsk a question
 

AnswerDB Compare Output Script Options

  • Tuesday, June 30, 2009 9:00 AMAndyCurt Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,
        We are using the DB Professional Edition to maintain our DB structure within a 3 stream source control model. Once our code is within the test stream we maintain a 'GOLD' comparison model of the stream to generate an incremental DB script. This is all fine other than the script generated by the schema comparison. Once testing is complete it is desirable to take this script to production without modification, but this is not possible because:
        1) The output script often treats the addition or changing of columns to a table by creating temp tables adding the new column + data from orginal and   then re-naming (you get the picture) which breaks our production tables which are replicated.
        2) The scripts include a lot of view refreshes which are not desirable for us at deployment time.

    My question is: Is there any way I can influence how the output script for the schema comparison handles these scenarios? Are there any other options that are not apparent from the IDE because I can't find any that imply they would influence this behaviour.

    Thanks

Answers

  • Tuesday, June 30, 2009 4:33 PMBarclay HillMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Andy,

    There are numerous options to control the behavoir of Schema Compare, but if are asking if there is a way to prevent CCDR or rebuilding of tables there many since SQL Server requires tables to be recreated for many schema changes.  It really comes down to what schema change you are making.  Are you adding columns, removing columns, or changing column options?

    Also, Schema Compare has new features in the GDR version of the product.  If you are using the DB Edition you may want to consider upgrading to the latest version of GDR. See: http://blogs.msdn.com/vstsdb/archive/2009/04/21/microsoft-visual-studio-team-system-2008-database-edition-gdr-r2.aspx
    Barclay Hill Program Manager VSTS: DB Team (DataDude, DBPro, Database Edition) Please mark the responses as answer if it resolves your question.

All Replies

  • Tuesday, June 30, 2009 4:33 PMBarclay HillMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Andy,

    There are numerous options to control the behavoir of Schema Compare, but if are asking if there is a way to prevent CCDR or rebuilding of tables there many since SQL Server requires tables to be recreated for many schema changes.  It really comes down to what schema change you are making.  Are you adding columns, removing columns, or changing column options?

    Also, Schema Compare has new features in the GDR version of the product.  If you are using the DB Edition you may want to consider upgrading to the latest version of GDR. See: http://blogs.msdn.com/vstsdb/archive/2009/04/21/microsoft-visual-studio-team-system-2008-database-edition-gdr-r2.aspx
    Barclay Hill Program Manager VSTS: DB Team (DataDude, DBPro, Database Edition) Please mark the responses as answer if it resolves your question.