无法使用 DacFX 部署到 Azure 故障转移组内的 Azure SQL 数据库

编程入门 行业动态 更新时间:2024-10-11 11:18:10
本文介绍了无法使用 DacFX 部署到 Azure 故障转移组内的 Azure SQL 数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我无法使用来自 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-27 14:20:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1156699.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:故障   数据库   DacFX   Azure   SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!