SSDT Schema Comparison needs to handle Database Triggers first - by Mark Freeman

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


3
0
Sign in
to vote
ID 773683 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 12/6/2012 8:29:10 AM
Access Restriction Public

Description

When generating a publish script from a schema comparison where there has been a change to a database trigger, the ALTER for that trigger needs to be the first statement in the main body of the script, do that it is in effect when all of the other statements run. It is currently generated last, just before the calls to sp_refreshsqlmodule.

I am using the SQL Server Data Tools 10.3.20905.0 in Visual Studio 2010 SP1, comparing the project schema with a SQL Server 2005 SP4 database.
Sign in to post a comment.
Posted by Microsoft on 2/28/2013 at 3:28 PM
Hey Mark,

Thanks for your feedback around the incorrect scripting/deployment ordering when dealing with modifying database level triggers in this case. The SSDT/DACFx team is not currently pursuing a fix for this issue, however, we have an item tracking it should it come up for future consideration. The workaround for this issue is to manually alter the generated deployment script so that the database trigger is refreshed in the appropriate order.

Thanks,
Adam Mahood
Program Manager
SQL Server Database Systems