service-broker

No enabled application monitor is on behalf of queue XYZ

时光怂恿深爱的人放手 提交于 2019-12-01 12:53:10
I created a console application which will be used by "Service Broker External Activator" service. The configuration file in "C:\Program Files\Service Broker\External Activator\Config" has been changed, but it writes an exception to log file as bellow EXCEPTION ERROR = 32, No enabled application monitor is on behalf of queue Here is my configuration <NotificationServiceList> <NotificationService name="ExternalActivatorService" id="100" enabled="true"> <Description>My test notification service</Description> <ConnectionString> <!-- All connection string parameters except User Id and Password

Why do I need two SQL Server Service Broker queues for a simple task?

╄→尐↘猪︶ㄣ 提交于 2019-11-30 10:47:58
All examples I find on the web for using SQL Server Service Broker queues seem to have two queues. I don't understand why and every example seems to assume that this is so obvious as to be unnecessary to explain. Several things will write to my queue and a stored procedure will read from it and insert to database. Why do I need two queues? For example: http://www.techrepublic.com/article/use-service-broker-internal-activation-in-sql-server-2005/6156264# Technically you can use one queue using SSB technology in your application. In this case this queue has a mess from request messages from

Disadvantages of SQL Server Service Broker [closed]

爱⌒轻易说出口 提交于 2019-11-30 02:20:24
I have been doing r&d for the scope of SQL Server Service Broker to replace current messaging solution MSMQ. I want to know disadvantages of SQL Server Service Broker in contrast to MSMQ for following criteria. Development Troubleshooting Performance (let's say we need to process 100,000 messages daily, having avg size around 25 KB) Scalability I've used Service Broker in my current project, having previously used MSMQ (brokered by MassTransit ) with great success. I was initially dubious about using Service Broker, but I have to admit it has performed very well. If you're using the Publish /

Detect SQL database changes

╄→гoц情女王★ 提交于 2019-11-29 10:58:49
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 understanding the concept a little better? If you want to detect changes and not just inserts you could

Disadvantages of SQL Server Service Broker [closed]

五迷三道 提交于 2019-11-28 22:37:06
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I have been doing r&d for the scope of SQL Server Service Broker to replace current messaging solution MSMQ. I want to know disadvantages of SQL Server Service Broker in contrast to MSMQ for following criteria. Development Troubleshooting Performance (let's say we need to process

Delete messages in service broker queue

谁说我不能喝 提交于 2019-11-28 21:18:21
问题 I'd like to clear my queue in SQL Server Management Studio, but I don't want to delete the whole queue just the content in the queue (the messages). 回答1: Something like this should work: while(1=1) begin waitfor ( receive top(1) conversation_group_id from dbo.yourQueue ), timeout 1000; if (@@rowcount = 0) break; end 回答2: Just combining the two previous answers (by Ben and Jānis) for clarity. This worked for me: declare @c uniqueidentifier while(1=1) begin select top 1 @c = conversation_handle

I want my database (SQL) to notify or push updates to client application

半世苍凉 提交于 2019-11-28 20:28:35
I was developing this application on VB.net 2010 and SQL 2008 . I wanted the clients to be notified for updates on the db, and the application used to check the db for changes in the specified minute using a timer, which really is not efficient. I read about query notification , sqldependency , service broker , but then I read something that said they might not be efficient if I have 100 clients and I'm using query notifications to push notifications to my application. Would someone help out on what I should do, and how I can do it (would be really helpful if examples are available). Thanks in

How to use SqlCacheDependency?

我只是一个虾纸丫 提交于 2019-11-28 17:19:21
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 sqlConnection = new SqlConnection(connectionString); var sqlCommand = new SqlCommand("SELECT Nickname FROM

Enable SQL Server Broker taking too long time

我的未来我决定 提交于 2019-11-28 15:26:34
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? http://rusanu.com/2006/01/30/how-long-should-i-expect-alter-databse-set-enable_broker-to-run/ alter database

SQL Server 2008 Service Broker tutorial — cannot receive the message (exception in transmission_status)

你。 提交于 2019-11-28 06:50:45
I am learning how to use the Service Broker of SQL Server 2008 R2. When following the tutorial Completing a Conversation in a Single Database . Following the Lesson 1 , I have successfully created the message types, contract, the queues and services. Following the Lesson 2 , I have probably sent the message. However, when trying to receive the message, I get the NULL for the ReceivedRequestMsg instead of the sent content. When looking at the sys.transmission_queue , the transmission_status for the message says: An exception occurred while enqueueing a message in the target queue. Error: 15517,