Database project deployment (vsdbcmd.exe) in wrong order for view-triggers - by Dennis van Emmerik

Status : 

  Accepted<br /><br />
		The product team has accepted this issue and will be determining when the issue will be addressed.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 778712 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 2/6/2013 11:33:04 PM
Access Restriction Public

Description

The deployment of a database project is in the wrong order. A script that vsdbcmd.exe created creates first the views, but the triggers on the views are created in (i think) alphabetical order.
It can happen that a trigger on 1 view is needed to make another trigger on another view work. This is because a view can have multiple base-tables which needs a trigger to properly perform/allow an update-statement. When the trigger is scripted later, the deploy will fail... 

The error-message is:
View or function 'dbo.vFoo' is not updatable because the modification affects multiple base tables.
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:30 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from: http://go.microsoft.com/?linkid=9832436
Posted by Microsoft on 3/27/2013 at 1:44 AM
Dennis,

Thanks for reporting this issue. The SSDT/DACFx team has taken a fix to address this scenario. Look for this fix in an upcoming release of SSDT/DACFx!

Thanks again for reporting the issue,
Adam Mahood
Program Manager
SQL Server Database Systems
Posted by Microsoft on 2/11/2013 at 1:41 AM
Thanks for your update. We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Dennis van Emmerik on 2/7/2013 at 6:51 AM
I've attached 2 files. One for VS2010 and another for VS2012.
Both are producing the same result. The trigger needed for the first view to work is scripted later.
In the database-project the scripts-folder contains the produced sql-files for my machine...
Posted by Microsoft on 2/7/2013 at 2:06 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

Please submit this information to us within 4 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 2/6/2013 at 11:50 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)