Error while Updating .mdf database

[亡魂溺海] 提交于 2021-02-11 06:28:34

问题


Following errors occurred while updating an .mdf database, it was working fine but before editing the Column Names of few tables. (I am using Server Explorer of Visual Studio 2013.)

Update cannot proceed due to validation errors.
Please correct the following errors and try again.

SQL72015 :: The table [dbo].[Customer] is being dropped and re-created since all non-computed columns within the table have been redefined.

SQL72031 :: This deployment may encounter errors during execution because changes to [dbo].[Product].[ProductID] are blocked by [dbo].[Product]'s dependency in the target database.

SQL72031 :: This deployment may encounter errors during execution because changes to [dbo].[Transaction].[TransactionID] are blocked by [dbo].[Transaction]'s dependency in the target database.

SQL72031 :: This deployment may encounter errors during execution because changes to [dbo].[Purchase].[TransactionID] are blocked by [dbo].[Purchase]'s dependency in the target database.

SQL72031 :: This deployment may encounter errors during execution because changes to [dbo].[Sales].[TransactionID] are blocked by [dbo].[Sales]'s dependency in the target database.


回答1:


Try this:

Go to Tools menu -> Options -> Database Tools -> Table and Database Designers ( -> Table and Diagram Options) -> Untick/Unselect Prevent saving changes that require table re-creation.

This is as of VS2010, but it should not be much different in VS2013.




回答2:


1. To make these changes, either perform them manually using SQL Server Management Studio or use Visual Studio Professional (or above) to perform a Schema Compare and select the option to ignore the possibility of data loss.

2. The TSD01234 error is also caused by having the "Verify Deployment" setting checked in your project's .sqlDeployment file (it is the last one under "advanced options").

3. Explicitly name the columns in the view. Deployment doesn't like wildcards.



来源:https://stackoverflow.com/questions/28009365/error-while-updating-mdf-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!