Service Broker

If you want to clear all the messages from all queues in a database you can use the following SQL:

ALTER DATABASE <dbName> SET NEW_BROKER

If the command fails its possible that there are open dialogs, so try this command:

ALTER DATABASE <dbName> SET NEW_BROKER WITH ROLLBACK IMMEDIATE
Comments are closed