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

标签 visual-studio azure azure-sql-database dac geo-replication

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

使用 DacFX 或直接从 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 在幕后打开与主数据库的连接造成的。目前,故障转移组不包括主数据库,因为它需要复制主数据库,并且主数据库无法复制 - 主服务器和辅助服务器上的主数据库是独立的并且都是可写的。这是一个已知问题,我们正在通过将主机视为特例来解决该问题。我们将允许在监听器指向的服务器上连接到它。

关于visual-studio - 无法使用 DacFX 部署到 Azure 故障转移组内的 Azure SQL 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45421495/

相关文章:

Azure 逻辑应用 SQL ODATA 按日期筛选

azure - 无法从不同子网中的 Azure 容器实例连接到 Azure SQL 数据库

azure-sql-database - 使用 EF Core 通过 AAD 身份验证连接到 Azure SQL 服务器

c# - Xamarin 表单选择器绑定(bind)

visual-studio - 添加到观看与添加到快速观看

asp.net-mvc - 用于 View 的 ASP.NET MVC 自定义 T4 模板

c# - 似乎缺少 Windows 窗体应用程序选项?

Azure Active Directory 授权 "The access token is from the wrong issuer '

azure - facebook 或 google 登录时 Aspnetcore 关联失败,确认电子邮件时 token 无效

sql - 在 SQL Azure 中如何创建只读用户