无法使用 DacFX 部署到 Azure 故障转移组内的 Azure SQL 数据库 [英] Can't Deploy to Azure SQL Database inside a Azure Failover Group using DacFX

查看:22
本文介绍了无法使用 DacFX 部署到 Azure 故障转移组内的 Azure SQL 数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用来自 VS2015/17 数据库项目发布的读/写侦听器端点或使用 DACFx 部署到 Azure 故障转移组内的 Azure SQL 数据库?我正在使用具有适当权限的包含用户,并通过直接部署到数据库的主 Azure SQL 服务器而不是故障转移组的读/写侦听器来证明它可以工作.

I can't deploy to an Azure SQL Database inside an Azure Failover Group using the Read/write listener endpoint from VS2015/17 database project publish or using DACFx? I'm using a contained user with appropriate permissions and have proved it works by deploying directly to the primary Azure SQL server of the database but not to the read/write listener of the Failover Group.

我在使用 DacFX 或直接从 VS2015/17 发布时遇到相同的异常.

I get the same exception using using DacFX or directly publishing from VS2015/17.

Exception Message:
Could not deploy package.

Inner Exception Message:
Unable to connect to master or target server '<MY DATABASE>'. You must have a user with the same password in master or target server '<MY DATABASE>'.

StackTrace:
   at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
   at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)
   at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken, DacLoggingContext loggingContext, Action`3 reportPlanOperation, Boolean executePlan)
   at Microsoft.SqlServer.Dac.DacServices.Deploy(DacPackage package, String targetDatabaseName, Boolean upgradeExisting, DacDeployOptions options, Nullable`1 cancellationToken)

推荐答案

此问题是由 DacFx 在后台打开与 master 数据库的连接引起的.目前,故障转移组不包括主数据库,因为它需要复制它并且主数据库无法复制 - 主服务器和辅助服务器上的主服务器是独立的并且都是可写的.这是一个已知问题,我们正在通过将 master 视为特殊情况来解决它.我们将允许在侦听器指向的服务器上连接到它.

This problem is caused by the fact that DacFx opens a connection to the master database behind the scenes. At present, the failover group does not include the master database because it would require replicating it and the master cannot be replicated - the masters on primary and secondary servers are independent and both writeable. This is a known issue and we are addressing it by treating the master as a special case. We will allow connections to it on the server to which the listener points to.

这篇关于无法使用 DacFX 部署到 Azure 故障转移组内的 Azure SQL 数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆