Enable Service Broker in Server level

  • Is there a way service broker can be enabled in server level ?

  • ALTER DATABASE [model] SET ENABLE_BROKER;

    Should make any new Databases have service broker enabled.

    You'd still need to update the rest of the DB's where it's not:

    SELECT name, is_broker_enabled FROM sys.databases

    where is_broker_enabled = 0

  • Thank you.So it is basically done for each database.

  • If you have tons of databases to do it on, you could create a cursor to loop through the databases and then run the SQL to enable service broker. Should be only a few lines. Depends if all the databases are on the same server.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply