Script generation option for Drop/Create instead of ALTER
-
24 สิงหาคม 2554 14:40
Hi,
If there is change in stored procedure or table object of source or taget specified in schema comparison tool, is there any option to explicitly set that it should generate Drop/Create statement instead of Alter statements?
ตอบทั้งหมด
-
25 สิงหาคม 2554 10:46ผู้ดูแล
Yes, there's option in database project settings to do this, in VS2010, it is in Project Properties page -> Deploy tab -> Deployment Configuration file, Click Edit button, you see Checkbox Block incremental deployment if data loss might occur, uncheck it will overwrite existing schema. Refer to Deploy section in here: http://msdn.microsoft.com/en-us/library/aa833291.aspx#Deploy
Best Regards,
Forrest | MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
2 กันยายน 2554 8:54ผู้ดูแล
Could you tell why you want Drop/Create script instead of Alter? The scenario detail is necessary to help people understand the question better.
I think I misunderstood your question, appologize for that. Going through data comparison options, I don't think there's such option to generate Drop/Create script.
Thanks and Regards,
Forrest | MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
16 มีนาคม 2555 0:06
I can give you my scenario for wanting to do this.
With our software, we are often upgrading clients with upgrades or hotfix scripts generated with dbproj for a particular issue.
The upgrade/hotfix are created with a "base schema" target to the current version but need to be applied to different clients databases and may have different minor versions, which means that all of the objects required for the particular upgrade/fix may or may not exist on the client/s database.