简体   繁体   English

使用SQL Server 2014将项目部署到Azure时出错

[英]Error deploying project with SQL Server 2014 to Azure

I'm trying to deploy an ASP.NET MVC with SQL Server 2014 project to Azure. 我正在尝试将带有SQL Server 2014项目的ASP.NET MVC部署到Azure。 Upon deploying, I'm getting the following error: 部署后,出现以下错误:

Web deployment task failed. Web部署任务失败。 (Could not deploy package. Warning SQL0: A project which specifies SQL Server 2014 as the target platform may experience compatibility issues with Microsoft Azure SQL Database v12. Warning SQL72030: The project and target databases have different collation settings. Deployment errors might occur. Error SQL72014: .Net SqlClient Data Provider: Msg 40517, Level 16, State 1, Line 2 Keyword or statement option 'default_language' is not supported in this version of SQL Server. Error SQL72045: Script execution error. The executed script: CREATE LOGIN [IIS APPPOOL\\DefaultAppPool] FROM WINDOWS WITH DEFAULT_LANGUAGE = [us_english]; (无法部署程序包。警告SQL0:将SQL Server 2014指定为目标平台的项目可能会遇到与Microsoft Azure SQL数据库v12的兼容性问题。警告SQL72030:项目和目标数据库具有不同的排序规则设置。可能会发生部署错误。错误SQL72014:.Net SqlClient数据提供程序:消息40517,级别16,状态1,第2行在此版本的SQL Server中不支持关键字或语句选项'default_language'。错误SQL72045:脚本执行错误。已执行的脚本:CREATE LOGIN [ IIS APPPOOL \\ DefaultAppPool],来自Windows的DEFAULT_LANGUAGE = [us_english];

I've tried changing the authentication method in my local SSMS from Windows authentication to SQL Server, using username and password, but as I suspected it had no effect, since the connection string is overridden to use Azure's connection string anyway upon deployment. 我尝试使用用户名和密码将本地SSMS中的身份验证方法从Windows身份验证更改为SQL Server,但是我怀疑它没有任何作用,因为在部署时连接字符串被覆盖为无论如何都使用Azure的连接字符串。

Any idea how to solve this issue and deploy this database to Azure? 知道如何解决此问题并将此数据库部署到Azure吗?

If you're using Azure SQL Database, then your database project should target sql azure, not sql 2014. they support different feature sets. 如果您使用的是Azure SQL数据库,则您的数据库项目应针对sql azure,而不是sql2014。它们支持不同的功能集。

To change in your database project, right click your DB project in Visual Studio and choose Properties, then under the project settings tab, change the Target Platform to Microsoft Azure SQL Database V12 . 若要更改数据库项目,请在Visual Studio中右键单击数据库项目,然后选择“属性”,然后在项目设置选项卡下,将“ Target Platform更改为Microsoft Azure SQL Database V12

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM