服务代理启用 Azure SQL

Service Broker Enable Azure SQL

我正在尝试将我的 Web 应用程序 (ASP.NET MVC) 发布到 Azure。

我在本地开发系统时,我使用SQL服务器作为数据库服务器。

这里我尝试使用 Azure SQL。

我想在 Azure 数据库上启用 Service Broker,但它不允许我这样做。我得到一个错误。

The operation cannot be performed on database "dbrngls" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.

在 Azure SQL 中还有其他方法可以做到这一点吗?

这是我为启用 Broker 而尝试执行的代码

ALTER DATABASE [dbrngls] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
  • Service broker 默认启用,无法禁用。

  • 不支持以下 ALTER DATABASE 选项:-

    ENABLE_BROKER - DISABLE_BROKER

  • 服务代理在 Azure SQL 单实例中不可用,但在 Azure SQL 托管实例中可用。

更多信息请参考MS Doc - Service broker and Azure SQL Managed Instance