Check If Service Broker is Enabled or Not in SQL Server

Service broker is used for various purposes including database change notification etc and sometime we need to ensure that service broker is enabled for database or not , To check it use the following code snippet
  1. Select is_broker_enabled from sys.databases  
  2. where name='YourDBName' 
 
when you run preceding code snippet, it will return following one of the output
 
If  1 returns then service broker is enabled.
If  0 returns the service broker is disabled.
 
Summary
 
I hope preceding code snippet useful for all readers , If you have any suggestion then please contact me.