MSSQL Broker

MSSQL Broker

Simple one, and this is mainly just for my reference, when restoring a Database in MSSQL, the database will likely keep it's Broker ID. If you're just restoring, then that should be fine, but if you're duplicating a Database, then you will need to give the broker a new identity.

ALTER DATABASE mydb SET ENABLE_BROKER

ALTER DATABASE mydb SET DISABLE_BROKER

ALTER DATABASE mydb SET NEW_BROKER

3 Simple queries to streamline this process. It's so easy, you might not even need one of the queries. Replace mydb with the name of your new database and start with NEW_BROKER, then you can ENABLE_BROKER it.

Enabling broker after Restoring Sql Server DataBase
I have DataBase with enabled Service Broker. Then I want to restore my database in program from backup of other database, but after restoring(I restore on existing database name), my method, whitch