Service broker is a communication service that is used by the Solver Private Host app. It monitors completion of tasks between multiple applications.
What causes service broker to fail and error out?
If you restored the repository database on the SQL server or turn off the SQL server service and then enable it, then service broker is disabled and would need to be enabled. You may get following error message on web portal or something related to service broker.
How Service Broker used in Private Host?
Here is a cycle that explains the process that Private Host goes through when running a report.
How to enable Service Broker?
- Check if Service Broker is enabled first before making any changes. Here is the query to verify if service broker is enabled.
SELECT is_broker_enabled FROM sys.databases WHERE name = 'Solver_Repository';
If the result is 1 then Service Broker is enabled and nothing needs to be done. If it returns 0 then Service Broker is disabled and needs to be enabled.
- To enable Service Broker, it requires you to put the repository into single user mode, start service broker, and then put the repository back into multi-user mode. The below query will perform that action on the Repository Database.
declare @DatabaseName nvarchar(1000) ,@SQL nvarchar(max) Set @SQL = '' Set @DatabaseName ='' Select @DatabaseName = name from sys.databases where name in ('Solver_Repository','BI360_Repository') --print @databasename select @SQL = @SQL + 'USE [Master]' +char(13)+ 'Alter Database ['+@databasename+'] SET SINGLE_USER with ROLLBACK IMMEDIATE' +char(13)+ 'Alter Database ['+@databasename+'] SET ENABLE_BROKER WITH NO_WAIT' +char(13)+ 'Alter Database ['+@databasename+'] SET MULTI_USER' +char(13) --print @SQL exec sp_ExecuteSQL @SQL