简体   繁体   English

Visual Studio 数据库项目不会部署到 SQL Azure

[英]Visual Studio database project won't deploy to SQL Azure

I've ran into problem very similar to this .我遇到了与非常相似的问题。 I have a.dbproj Visual Studio database project.我有一个 .dbproj Visual Studio 数据库项目。 It deploys just fine in SQL Server Express.它在 SQL Server Express 中部署得很好。 Now I want to deploy it to SQL Azure - I change the connection parameters but deployment fails with the following text:现在我想将它部署到 SQL Azure - 我更改了连接参数,但部署失败并显示以下文本:

C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets(120,5): Error Deploy01234: The target database schema provider could not be determined. C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets(120,5):错误 Deploy01234:无法确定目标数据库架构提供程序。 Deployment cannot continue.部署无法继续。 Done executing task "SqlDeployTask" -- FAILED.完成执行任务“SqlDeployTask”——失败。

Is deploying.dbproj projects to SQL Azure supported?是否支持将.dbproj 项目部署到 SQL Azure? How do I make Visual Studio deploy the database into SQL Azure?如何让 Visual Studio 将数据库部署到 SQL Azure? What are other ways to achieve more or less the same results except recreating the database manually using Azure portal?除了使用 Azure 门户手动重新创建数据库之外,还有哪些其他方法可以达到或多或少相同的结果?

If you are using Visual Studio 2012, you can now create a Database project and go to Properties - set its Target Platform to SQL Azure in Project Settings tab.如果您使用的是 Visual Studio 2012,您现在可以创建一个数据库项目并将 go 设置为属性 - 在项目设置选项卡中将其目标平台设置为 SQL Azure。 Also you can configure the setting for dacpac output.您还可以配置 dacpac output 的设置。 Use this file to import directly as a new SQL Azure database.使用此文件直接导入为新的 SQL Azure 数据库。

As far as I know, Database projects are still not supported by Windows Azure.据我所知,Windows Azure 仍然不支持数据库项目。 You can deploy the project to a local SQL server and then use the "Generate Scripts" feature to port the database to SQL Azure.您可以将项目部署到本地 SQL 服务器,然后使用“生成脚本”功能将数据库移植到 SQL Azure。 See this link .请参阅此链接

An easy solution is to create the database locally and use the SQL Azure Migration Wizard to do the migration up to SQL Azure. An easy solution is to create the database locally and use the SQL Azure Migration Wizard to do the migration up to SQL Azure. It works very well in just a few clicks (and will fix common errors).只需单击几下,它就可以很好地工作(并将修复常见错误)。

Database projects don't work with SQL Azure.数据库项目不适用于 SQL Azure。 What I do is before deploying, create a brand new database on local server (to ensure it is up to date with no dev scripts), and then sync that database to Azure with RedGate SQL Compare.我所做的是在部署之前,在本地服务器上创建一个全新的数据库(以确保它是最新的,没有开发脚本),然后将该数据库同步到 Azure 与 RedGate SQL 比较。 I do a backup first with RedGate SQL Azure Backup.我先用 RedGate SQL Azure Backup 进行备份。

When we first built DB projects, SQLAzure was still going through its identity crisis and didn't know what it wanted to be.当我们第一次构建 DB 项目时,SQLAzure 还在经历身份危机,不知道自己想成为什么样的人。 ;) ;)

DBProjects support a significant superset of capabilities vs. SQLAzure.与 SQLAzure 相比,DBProjects 支持重要的功能超集。 Therefore, it's quite possible that it'll create scripts that won't run against SQLAzure.因此,它很可能会创建不会针对 SQLAzure 运行的脚本。

I know that the team who took-over the DBProject tooling were looking at restricting the database project generators to output SQLAzure-compatible scripts, but I don't know how far they got or whether they decided to proceed.我知道接管 DBProject 工具的团队正在考虑将数据库项目生成器限制为 output SQLAzure 兼容脚本,但我不知道他们走了多远,也不知道他们是否决定继续。

I echo dunnry's suggestion above and use the SQL Azure Migration Wizard or Jeremy's and use SQL 2008 R2 and generate Azure-compatible scripts.我回应 dunnry 上面的建议并使用SQL Azure 迁移向导或 Jeremy 的建议,并使用 SQL 和 Azure 兼容的脚本。

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

相关问题 无法从Visual Studio数据库项目连接到SQL Azure服务器 - Unable to connect to a SQL Azure server from a Visual Studio database project Azure Sql 数据库与 Visual Studio 代码中的 python - Azure Sql DataBase with python in Visual Studio Code Visual Studio 2017 SQL数据库项目 - Visual Studio 2017 SQL database project Visual Studio数据库项目和SQL Server管理 - Visual Studio Database Project and SQL Server Management Visual Studio错误地报告未安装的Web部署提供程序(SQL Azure) - Visual Studio falsely reports Web Deploy provider not installed (SQL Azure) Visual Studio 2010数据库浏览器无法持续连接到SQL Server - Visual Studio 2010 Database Browser won't connect to SQL Server consistantly 从 Visual Studio 2013 数据库项目中清理 SQL Server 数据库 - Clean SQL Server database from Visual Studio 2013 database project 调用SQL的Web服务将无法在Visual Studio外部运行 - Web service that calls SQL won't work outside of Visual Studio 部署 Azure SQL 数据库对象 - Deploy Azure SQL Database Objects Visual Studio-SQL数据库项目-DacPac存储过程格式 - Visual Studio - SQL Database Project - DacPac stored procedure formatting
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM