Note that we are checking if SB is enabled before doing any work. We are also CATCHing the case where we cannot ENABLE_BROKER because of the duplicate GUID issue. At the very end of the procedure I am turning on the TRUSTWORTHY flag and ensuring my db is owned by SA. You may not need these last two steps, but our environment and setup requires it.
In the next post I'll cover my [[Service Broker Monitoring Routine]].
Dave Wentzel CONTENT
sql server data architecture service broker