Hi,
I am creating a fresh database through installer and trying to enable thr broker using the following code
USE [{dbname}]
GO
DECLARE @VAR AS nvarchar(1024)
SET @VAR = 'ALTER DATABASE ' + db_name() + ' SET ENABLE_BROKER
WITH ROLLBACK IMMEDIATE'
EXEC sp_executesql @VAR
GO
But after running this setting, i need to run another insert script but the installer throws error like...
In RecurseDirectories: Running scripts in .\Target
Processing file .\Target\List.SQL
Exception encountered. Database: BrokerTestDB
In ExecuteSQL: General network error. Check your network documentation.
This happens only when i try SET ENABLE_BROKER. If i remove that portion from the script and run it on backend using SQL Server Management Studio, it works fine.
Any idea whats going wrong ????
Thanks
Start Free Trial