locked
Data Tier App VS2012 does not upsdate database RRS feed

  • Question

  • From Gert's video http://www.bing.com/videos/watch/video/gert-drapers-demonstrates-sql-server-data-tools/1r7u8u0qb  at the 11 minute mark, he generates a build script that incorporate both the SQL entered directly into his View code AND the changes he made directly to a table in VS.  When I do exactly the same thing, the tool does not include any of my changes that I made to my tables in VS2012.  The only way I can make things work is to build the .dacpac and to upgrade my database from that.  Is there some setting I have turned on/off that will incorporating my VS changes?

    thanks


    JPK

    Monday, March 4, 2013 11:55 PM

Answers

  • Hey James,

    When publishing a database project in VS2012, the underlying DACFx engine will do a comparison between the current state of the database and the state of the schema defined in the project. DACFx will generate the necessary incremental deployment script to upgrade the database to match the project. The comparison will not take into account any open imperative scripting windows that are targeting your live database.

    Deploying a dacpac built from the project to upgrade the database is also a valid method of achieving this end.

    Thanks,

    Adam


    Adam Mahood - Program Manager Windows Azure Import-Export Service / Data-Tier Application Framework (DACFx)/ SQL Server Data Tools

    Friday, March 8, 2013 5:05 AM

All replies

  • Hey James,

    When publishing a database project in VS2012, the underlying DACFx engine will do a comparison between the current state of the database and the state of the schema defined in the project. DACFx will generate the necessary incremental deployment script to upgrade the database to match the project. The comparison will not take into account any open imperative scripting windows that are targeting your live database.

    Deploying a dacpac built from the project to upgrade the database is also a valid method of achieving this end.

    Thanks,

    Adam


    Adam Mahood - Program Manager Windows Azure Import-Export Service / Data-Tier Application Framework (DACFx)/ SQL Server Data Tools

    Friday, March 8, 2013 5:05 AM
  • Adam, appears I cant reply to your Answer.  Someone marked it as the final answer.  but it isn't for me because it doesn't explain why it isn't working for me.  You say it willcreate scripts for open files.  Fine.  but mine are not open.   I made the edits, to several tables, in the same manner as in the video, and saved and closed them. They are no being scripted or incorporated.

    Also, if I do the schema compare, between the SDB and my project, the left and right comparison DOES highlight the differences between the two.  So, again, what am I missing because the scripts are not being generated, at least I don't see them anywhere either in the UI or on the file system.  And did build/compile the assembly as well

    I know the dacpac deploy works, but I am working with a large database, so when all I want to do is modify a few columns that is way overkill.  So I don't know if you will even see my response now since I cant respond to your reply.  If you do though, let me know if you understand my issue and what I may be doing wrong

    thanks


    JPK


    • Edited by James Klett Saturday, March 9, 2013 9:41 PM
    Saturday, March 9, 2013 9:40 PM