I have on my local dev enviroment set up a Sqldependency which works fine, I get notified when changes occur. But whe I try to monitor the live database the changes in the database is not seen in the "private void dependency_OnChange(object sender, SqlNotificationEventArgs e) ", is there some ports that need to be opened on the server?
Asked
Active
Viewed 353 times
2 Answers
0
Make sure the Service Broker is enabled on your production database.
In SSMS, you can find this under Database Properties, Options or you can run
SELECT name, is_broker_enabled FROM sys.databases;
The is_broker_enabled bit should be set to 1.
JSR
- 5,686
- 2
- 19
- 24
0
I found the solution here http://blogs.msmvps.com/siva/2011/11/22/subtle-sqldependency-notification-issue/ On the production server I had to enable ARITHABORT on the database. After enabling that it worked perfect.
MTplus
- 1,377
- 3
- 21
- 43