service-broker

How do I get the size of a Service Broker Queue quickly when the table is >500k rows?

I'm trying to determine the total size of a Service Broker Queue and transmission queue when the queue is very large. The problem is traditional querys like the ones below don't work since it's not a table. Any ideas? EXEC sp_spaceused 'sys.transmission_queue' SELECT rows FROM sysindexes WHERE id = OBJECT_ID('ConfigMgrDrsQueue') AND i...

Monolog conversations in SQL Service Broker 2008

Hi, I have a scenario in which I need to process(in SQL Server) messages being delivered as .xml files in a folder in real time. I started investigating SQL Service Broker for my queuing needs. Basically, I want the Service Broker to pick up my .xml files and place them in a queue as they arrive in the folder. But, SQL Service Broker...

What is Service Broker ?

What is Service Broker in SQL Server and is it meaningful to enableitin a simple Database, Not in a distributed DB. please do not close this question, I saw others similar question and non of them answered me. ...

Service Broker not working after database restore

Have a working Service Broker set up on a server, we're in the process of moving to a new server but I can't seem to get Service Broker set up on the new box. Have done the obvious (to me) things like Enabling Broker on the DB, dropping the route, services, contract, queues and even message type and re adding them, setting ALTER QUEUE ...

SQL Service Broker Peek on queue

Hi, I'm writing a C# application that uses SSB queues to communicate with other systems. When receiving a message from a SSB queue, I am not always sure I am able to handle it. Therefore I would like to peek at the queue (or maybe just being notified that there is a message, not neccessarily it's content), but at the same time using the ...

The future of SQLServer Service Broker

Hi all, is there any information on the future of the Service Broker infrastructure in SQLServer? The team's blog (http://blogs.msdn.com/b/sql_service_broker/) is not very active and there were only minor changes in SQL 2008 R2 release. When building now a distributed system that needs async queueing and there is already a SQLServer / ....

Using SQL 2008 ServiceBroker for high-volume threadsafe FIFO queue

I'm just starting to evaluate ServiceBroker to determine if it can perform as a reliable queue in a very specific context. Here is the scenario: (1) need to pre-calculate a large (several million) population of computationally expensive values and store in a queue. (2) multiple processes will attempt to read/dequeue these values at ru...

Service Broker getting Automatically Disabled

Hi All, As we know the Service Broker is enabled for the new databases we create. But recently the service broker got disabled automatically. Even if the database was restored shouldnt the Service Broker be enabled by default? ...

Service Broker And Web services

Hi, I want to implement a stored procedure (within a service broker infrasturture) which calls a web service. I looked some examples from Aschenbrenner's book on Service Broker. However I don't find any with a web service call. Could anyone help? Thanks Sqlbs ...

Service Broker Design

Hi I’m looking to introduce SS Service Broker, I have a remote orders database and a local processing database, all activity on the processing database has to happen in sequence, this seems a perfect job for Service Broker! I’ve set up the infrastructure, I can send and receive messages and now I’m looking at the design of the processi...

How can I check in c# if Broker Service is enabled in SQL ?

I want to check if Broker Service is running using code and depending on the status, start sqldependency or not. How can I do that? ...

Service Broker : Sys.Conversation_endpoints filling up with CO/CONVERSING messages when using With Cleanup

We recently identified a problem with one of our databases where as a result of a 'fire & forget' setup (i.e: conversations being closed immediately after sending), our sys.conversation_endpoints table was filling up with DI/DISCONNECTED_INBOUND messages. This eventually spilled over into the tempDB, causing it to grow enormously and eat...

Enabling broker after Restoring Sql Server DataBase

Hello, I have DataBase with enabled Service Broker. Then I want to restore my database in program from backup of other database, but after restoring(I restore on existing database name), my method, whitch enables Service Broker, puts this error: Msg 9772, Level 16, State 1, Line 1 The Service Broker in database "ServeDB2" cannot be ...

How do I change the destination service name of a queue / service

I have a SQL Server 2005 Service Broker queue "ProductChangeMessages" and a Service Broker service "ProductChangeNotifications". The pair are the backing to an SqlDependency I'm trying to get working but the OnChanged of the dependency doesn't fire. When the table being watched changes the subscription (visible through the results of sel...

Using Service Broker with Sql Server Express 2008

Is it possible to use external activation on sql express without going thru sql enterprise/standard? I would like to send a message to sql express service broker, then have it notify my external application service running on the same box, in order to kick off a console app to pickup the message and process it. I do this already succes...

Can I ensure the order of dialog conversations in sql service broker?

So, I've got an 'A' server and a 'B' server. We are using SQL Service Broker to perform replication. An application we have will need to write data to either the 'A' server, or the 'B' server. (one may be down, and the other one should take over) Data is written to the database only within stored procedures, which are wrapped in a ...

Using SQLDependency/SqlNotificationRequest to have multiple instances of the same app receive the same notifications?

I started looking at this recently with the very limited knowledge that the ASP.NET Cache could somehow make use of a SqlCacheDependency to invalidate the cache when a table (or a queries results) change. This lead me to the SQLDependency and SqlNotificationRequest classes. While the details of the SqlNotificationRequest class still e...

SqlDependency.Start permissions

I'm having a really tough time finding authoritative information on how to set up and use SqlDependency caching with SQL Server 2008. We've implemented the use of sql dependency cache, and it's working in our dev environment. Unfortunately, with the default settings the user needs to have quite elevated permissions which our DBAs will no...

Receive Service Broker from a CLR stored procedure.

Hi guys! I'm trying to move this T-SQL stored procedure to a CLR procedure, but there's a Service Broker specific command that I don't know how to implement: DECLARE @msgBody XML DECLARE @dlgId uniqueidentifier ;RECEIVE top(1) @msgBody = message_body, @dlgId = conversation_handle FROM dbo.Targ...

MSMQ vs. SQL Server Service Broker

I have an application that consists of three parts: a front-end web shop for end-users and business partners an order-management system to handle those orders a technical database system to handle all the technical details of those products and services ordered Today, those systems (which are on separate servers and being developed b...