service-broker

Detect SQL database changes

我怕爱的太早我们不能终老 提交于 2019-11-28 04:21:14
问题 Consider this example: INSERT INTO [Table] (column1) SELECT value1 If I were to execute this command in SSMS, in regards to a c# forms application, what would I need to do in order to recognize this event? Something as simple as the application displaying a MessageBox when this event occurs. I just can't seem to work this one out or find any helpful data on it. I have attempted to use SqlDependency but am not having any luck. If that is the path I need to go down, can anyone help me out with

Enable SQL Server Broker taking too long time

丶灬走出姿态 提交于 2019-11-27 19:46:44
问题 I have a Microsoft SQL server 2005 and I tried to enable Broker for my database with those T-SQL: SELECT name, is_broker_enabled FROM sys.databases -- checking its status 0 in my case ALTER DATABASE myDatabase SET ENABLE_BROKER The Alter Database takes long time to process. It is now over half hour and it is still running. Not sure if it is waiting for something else or I have to clean up anything first, such as delete all the messages, contract, queue and services under service broker? 回答1:

How to use SqlCacheDependency?

青春壹個敷衍的年華 提交于 2019-11-27 10:10:55
问题 I need to implement SqlCacheDependency for a table which will depend on this query: SELECT Nickname FROM dbo.[User] . I have created a method for this purpose: private IEnumerable<string> GetNicknamesFromCache() { const String cacheValueName = "Nicknames"; var result = HttpRuntime.Cache.Get(cacheValueName) as List<String>; if (result == null) { result = _repository.GetAllNicknames(); var connectionString = ConfigurationManager.ConnectionStrings["RepositoryContext"].ConnectionString; var

.NET API for SQL Server Service Broker [closed]

十年热恋 提交于 2019-11-27 06:52:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Is there a .NET API or object model for using SQL Server Service Broker? 回答1: There isn't an official supported API. There are some community samples though which are developed by the Service Broker team or related teams in MS which you can use as a starting point, but they are not officially supported (you

SQL Service Broker — one central SQL and more satellite SQL

余生长醉 提交于 2019-11-26 21:54:28
问题 The system consists of one central SQL server and two or more satellite servers. The satellite servers collect the measured data and send them to the central server. See the picture: (The picture was taken from the official Service Broker Communication Protocols article and modified.) I need to make the act of adding another satelite SQL as simple as possible. I mean, setting the newly added satelite SQL should possibly be the same as of the other satelite SQL machines. Is it possible at all?