provides the infrastructure for queue-based asynchronous message communication between databases.

learn more… | top users | synonyms

13
votes
2answers
309 views

Does firing off an indefinite WAITFOR increase the log file size?

In the last release of my app, I added a command that tells it to wait when something arrives in the Service Broker queue: WAITFOR (RECEIVE CONVERT(int, message_body) AS Message FROM MyQueue) The ...
10
votes
3answers
405 views

Where to learn SQL Server Service Broker?

Are there any good resources to learn Service Broker? I'm looking for a newbie-friendly guide.
10
votes
1answer
171 views

Sch-M WAIT blocks Sch-S in SQL Server 2014 but not SQL Server 2008 R2?

We recently migrated our production instances from SQL 2008 R2 to brand new SQL 2014 servers. Here is an interesting scenario that we uncovered with our usage of Service Broker. Consider a database ...
10
votes
1answer
3k views

SQL Server Cache Flush and Disk I/O

We're busy load testing an OLTP system we've developed in .NET 4.0 and runs SQL Server 2008 R2 in the back. The system uses SQL Server Service Broker queues, which are very performant, but we are ...
6
votes
1answer
745 views

Service Broker: Queue Monitor is dropped after poison message

I have searched everywhere and there isn't an answer online. There is one similar question on stackoverflow but it's not exactly the same and it has no accepted answer. When I setup event ...
5
votes
2answers
924 views

Performance impact of waiting on a service broker message

I have a situation where multiple client apps send messages via the Service Broker (utilizing stored procs). These messages are picked up by yet another client app and then processed. The way the ...
5
votes
1answer
362 views

Recommendations on how to organize Queues in Service Broker

I have a service broker application that currently has 5 or 6 queues on two servers. The general workflow is: Server A User populates some tables User fires stored proc which puts a message into ...
5
votes
1answer
820 views

Service Broker & AlwaysOn Availability Groups: Odd Transmission Queue Behavior

I have also posted this question on my blog: http://www.sqldiablo.com/2012/04/15/service-broker-alwayson-availability-groups-odd-transmission-queue-behavior/. I’ve been working on a project over the ...
5
votes
1answer
188 views

SA permissions issues with many nested objects

I have a broker application that's relatively complicated. Today, after I made some changes, I started getting the error: The server principal 'sa' is not able to access the database 'XYZ' under ...
4
votes
1answer
333 views

Why does WAITFOR (RECEIVE FROM QUEUE) show up in the monitor incorrectly?

I kick off the following command in my app: WAITFOR (RECEIVE CONVERT(int, message_body) AS Message FROM MyQueue) When I run `sp_who2 active', I get Status=SUSPENDED and Command=DELETE Note: ...
4
votes
1answer
297 views

Large Transaction Log Backups in Service Broker-enabled system

We have a system that uses Service Broker for asynchronous messaging, with a fairly high throughput of messages. We don't really care about the persistent features of SSB in this scenario -- the ...
4
votes
1answer
262 views

Check Index Fragmentation on SQL Server Audit Queues

I've read this excellent article, http://rusanu.com/2010/03/09/dealing-with-large-queues/, and seem to be having the same issue, due to a low space issue, the service broker was turned off on a ...
4
votes
1answer
614 views

SQL Server 2008 R2 Service Broker Troubleshooting

I set up Service Broker between two databases on separate instances, one on a 2008 R2 Cluster the other on a separate box also 2008 R2. I have gone through the process of setting up all the objects ...
4
votes
1answer
309 views

SQL Server CPU spikes - possibly non-query related - suggested indicators

I'm looking for suggestions for indicators I could monitor to discover what is causing these cpu "blunted spikes". Some known information: sqlserver.exe is confirmed as the process consuming the ...
3
votes
2answers
1k views

How to make a flexible service broker receive in a stored sql procedure, how to pass “FROM” parameter into receive

a while ago I asked a question about how to make begin dialog and send more flexible so that it can be embedded in a procedure that takes the to, from, parameters as sysname variables. Service Broker ...
3
votes
1answer
466 views

Service Broker Procedure that will be used by multiple initiators to begin dialog conversation.. how to pass a parameter into it

The standard format for beginning a dialog is like this: Declare @dialog_handle UNIQUEIDENTIFIER BEGIN DIALOG CONVERSATION @dialog_handle FROM SERVICE initiator_1 TO SERVICE 'target_1' ON ...
3
votes
1answer
756 views

Activity Monitor showing long duration for WAITFOR RECEIVE

In Activity Monitor, the following query is causing high CPU and 281ms average duration. WAITFOR ( RECEIVE conversation_handle , service_contract_name , message_type_name , message_body ...
3
votes
1answer
1k views

How do query notifications detect changes in the query result?

I am working with a legacy database that has implemented query notifications against a table called ColorList. While running a server-side trace for an unrelated issue, I noticed the query SELECT ...
3
votes
1answer
675 views

Using Service Broker internal to a single SQL Express instance?

I understand that SQL Express cannot send Service Broker messages to other instances without a Standard (or better) instance involved in the chain. But is it possible to use Service Broker to send ...
3
votes
1answer
912 views

Status for a service broker queue

Looking at the sys.service_queues DMV, I see that there are columns called "is_enqueue_enabled" and "is_receive_enabled". However, in the "ALTER QUEUE" DDL, there only seems to be a "STATUS" that can ...
3
votes
1answer
660 views

sql server service broker queue pass parameter to stored procedure

Stored Procedure Create PROCEDURE [dbo].[InitServiceLog] ( @name varchar(max)=null ) AS BEGIN SET NOCOUNT ON; insert into [AdventureWorks].[dbo].[ServiceBroker_Log](Service) ...
3
votes
1answer
2k views

Enabling Service Broker on a database involved in an availability group

I'm trying to enable Service Broker on a SQL Server 2012 database that is part of an availability group and keep getting this error message: The operation cannot be performed on database "dbname" ...
3
votes
0answers
107 views

ENABLE_BROKER vs NORECOVERY

I have two nodes with MSSQL2012 which work with AlwaysOn High Availability After some crash I had to remove db from availability group on the one of the nodes. For restoration I've made backup ...
3
votes
0answers
377 views

SqlDependency permissions

The db is SQL Server 2012. All data tables are in the dbo schema. All data access is done via stored procedures in a different schema (user rt). I want to add query notifications for some tables, so I ...
3
votes
0answers
605 views

Event Notification / Service Broker - no inserts anymore, “previously existing connection with the same peer”

I've been working on getting several servers to feed Event Notifications to a central server. Had everything working yesterday, then managed to break it. Dropping and recreating the ...
2
votes
2answers
269 views

Why does the service broker require a master key after restoring to a different server?

I've been moving some databases which use the service broker to new servers recently via backup and restore. I've noticed that once I do this, these databases start throwing the database master key ...
2
votes
1answer
178 views

Is the Service Broker good for publishing data between servers?

I'm trying to find a better solution when publishing data to a remote table. So we have Server A and Server B. Server A holds a master table which should be replicated to Server B. Currently, we ...
2
votes
1answer
391 views

Any problem with same conversation handle used by multiple services communicating with one target queue in a multiplexed service broker order queue?

I asked a question about implementing conversation groups in a SQL Service Broker setup which has several User Services communicating with the Server Service (Processing xml data requests to be sent ...
2
votes
1answer
549 views

Service Broker stops working [closed]

I'm new to Service Broker. Our existing Service Broker suddenly stops working and I can't figure out why. When I try to enable Service Broker (which is already enabled) I get this in SQL error log: ...
2
votes
1answer
840 views

Error: 9245, Severity: 16, State: 1. / During the last time interval XXX query notification errors were suppressed

I've got this sequence of error messages showing up regularly in my server error log: Error: 9245, Severity: 16, State: 1. During the last time interval 257 query notification errors were ...
2
votes
1answer
277 views

Accessing Service Broker from Different Databases

In my Application we have a lot of databases nearly 100 dbs. We are planning to use Service Broker for calling a Stored Proc Async. Instead of running Service Broker on all the Databases, Is it ...
2
votes
0answers
36 views

Service broker routes and DNS

Apologies for the long post but I've recently seen some strange behaviour with Service Broker when the routes it uses reference a DNS entry, and I am wondering if anyone has seen the same? We have ...
1
vote
1answer
168 views

Recommendations on creating user-objects on system database

I want to setup a bunch of Event Notifications on SQL Server using Service Broker for our production database. I've setup a new database on my testing machine, and everything works well. The problem ...
1
vote
1answer
184 views

Do SELECT (without ORDER BY) return the same message as RECEIVE?

My current client needs to be able to PEEK messages in a SQL Server Service Broker queue. The current implementation uses RECEIVE and rollback to peek. As that generates writes to the transaction ...
1
vote
1answer
310 views

Can we use SQL Express to send messages to SQL Standard using the Service Broker?

We want to use SQL Express at our local sites but to still be able to push data back to our head office using the Service Broker. SQL Server at the head office is 2008 R2 Standard. Looking at the ...
1
vote
1answer
722 views

Elegant way of sending e-mails with Service Broker

Is there an elegant way for sending e-mails using a Service Broker service/queue? I want to setup an EVENT NOTIFICATION for SQL Server, and I'd like to send e-mails to operators for each message on ...
1
vote
2answers
590 views

sql server removing service_queues

Hi when i query select * from sys.service_queues in sql server 2008 sp3 i am getting InternalMailQueue ExternalMailQueue _LakeSide_DbTools_DeadlockQueue QueryNotificationErrorsQueue ...
1
vote
4answers
956 views

The broker in the sender's database is in single user mode

Could you please help with why am I getting this sys.transmission_queue.transmission_status message after restoring from a snapshot? The broker in the sender's database is in single user mode. ...
1
vote
1answer
33 views

It is mandatory to create a route when creating an event notification?

I'm starting with service broker. Already managed to setup an event notification for blocked processes based on this answer and it's working flawlessly. Then I wanted to setup another one to notify ...
1
vote
1answer
61 views

High Service Broker queue

My production database suffers from a large Service Broker message queue. It is around 2 million. I would like to decrease it as small as possible. I have tried dbcc ...
1
vote
1answer
1k views

Permissions using .NET SqlDependency

SQLDependency Notifications work fine logged in as Windows Domain User, using Trusted Connection. But not as SQL-User: I created a db login, user and role as follows: CREATE LOGIN myLogin WITH ...
1
vote
1answer
435 views

Service Broker - Communication not happening between servers despite ssbdiagnose saying all is well

I am setting up Service Broker communication between 2 servers, A and B we will call them. I used this article as an example: ...
1
vote
1answer
255 views

Effects of enabling service broker

I would like to use SqlCacheDependency to update a dataset in real-time, but we have not enabled the service broker on our production database. Could enabling the service broker have any adverse ...
1
vote
1answer
439 views

Setting Alerts for Autogrow

Can I set alerts for an autogrow event in SQL Server (2005 or 2008 R2)? I've searched around and haven't found the 'error number' for autogrowth, if there is one. In case this isn't possible, how ...
1
vote
1answer
580 views

SQL Server Service Broker and Deadlocks

I am reading through SQL server books online for the first team whilst learning how to use the service broker and I came across this statement: The application that implements the service reads ...
1
vote
0answers
2k views

DELETE failed because the following SET options have incorrect settings: 'ANSI_NULLS'

I have inherited a few scripts that are pumped through a c#.NET custom app to update a SQL2005 SP3 database. One of these scripts does a deletion on a user table called msw_timer_task, based on a ...
1
vote
0answers
88 views

Monitor For Disabled Queue On RDS SQL Server

I would like to somehow get notification of a queue being disabled due to poisoned messages. (The issue is occasional resource contention. Until we solve it, monitoring would help us be aware.) In my ...
1
vote
0answers
460 views

Can the service-broker cause SQL Server to crash when using SQLDependency

I have C# application that uses SQLDependency to get updates from a message table. I have tested it quite extensively and worked great in the development environment but when I ran it on the ...
0
votes
1answer
400 views

Generate script for SQL Broker objects

I'm using SQL Server Management Studio to generate scripts for all the objects in an existing database: but the objects related to SQL Broker (messages, queues and services) are not generated. ...
0
votes
1answer
60 views

Do I need to have two queues for Service Broker?

I am just starting with Service Broker and looking at the examples in blogs, most have a sending and receiving service with separate queues. Looking at the SEND TO command (to send a message) I need ...