How can I enable and disable Service Broker for Amazon RDS SQL Server?
Last updated: 2020-07-03
How can I enable and disable Service Broker for Amazon Relational Database Service (Amazon RDS) SQL Server?
Service Broker is supported for Amazon RDS, but Service Broker endpoints aren't supported on Amazon RDS. For more information about Service Broker, see the Microsoft documentation for Service Broker.
When you enable Service Broker, Amazon RDS requests a database lock. Before enabling Service Broker, close all open connections to the database.
1. Check to see whether Service Broker is enabled:
select name,is_broker_enabled from sys.databases where name= [YourDB]
2. If Service Broker isn't enabled, generate a new Service Broker:
ALTER DATABASE [YourDB] SET NEW_BROKER; GO
ALTER DATABASE [YourDB] SET ENABLE_BROKER; GO
ALTER DATABASE [YourDB] SET PARTNER OFF; GO
ALTER DATABASE [YourDB] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
ALTER DATABASE [YourDB] SET DISABLE_BROKER; GO