Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Accepted Help for as Accepted


1
0
Sign in
to vote
Type: Bug
ID: 778712
Opened: 2/6/2013 11:33:04 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

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.
Details
Sign in to post a comment.
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)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
DeployError_VS2012.zip (restricted) 2/7/2013 -
DeployError_VS2010.zip (restricted) 2/7/2013 -