[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

new to 2005 Service Broker question

fireball

3/23/2007 10:17:00 AM

In book "Inside Microsoft SQL Server 2005" by Itzik, there goes, that it is
possible that receiving application and sending application _never_ work at
the same time (Chapter11 (I have only translation)). How is that possible to
deliver a message, if applications never run on the same time? I guess they
mean, it doesn't require applications itself, but it requires SqlServer
instances to connect each other. Right?





3 Answers

Remus Rusanu [MSFT]

3/23/2007 3:58:00 PM

0

Yes, the two SQL Server 2005 instances must be up and running simulatenously
at some moment.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

HTH,
~ Remus Rusanu

SQL Service Broker
http://msdn2.microsoft.com/en-us/librar...(en-US,SQL.90).aspx


"fireball" <fireball@onet.kropka.eu> wrote in message
news:eu09rn$o41$1@nemesis.news.tpi.pl...
> In book "Inside Microsoft SQL Server 2005" by Itzik, there goes, that it
> is possible that receiving application and sending application _never_
> work at the same time (Chapter11 (I have only translation)). How is that
> possible to deliver a message, if applications never run on the same time?
> I guess they mean, it doesn't require applications itself, but it requires
> SqlServer instances to connect each other. Right?
>
>
>
>
>


Roger Wolter[MSFT]

3/23/2007 5:44:00 PM

0

As the person who wrote that chapter, I meant that the application calling
the SEND command and the application calling the RECEIVE command never have
to run simultaneously. I assume SQL Server is always running as a
background service. An example might be a bank system that puts account
change messages on a queue all day long and then at the end of the day all
the tellers go home and the nightly processing uses these messages to
compute new account balances.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cp...

"fireball" <fireball@onet.kropka.eu> wrote in message
news:eu09rn$o41$1@nemesis.news.tpi.pl...
> In book "Inside Microsoft SQL Server 2005" by Itzik, there goes, that it
> is possible that receiving application and sending application _never_
> work at the same time (Chapter11 (I have only translation)). How is that
> possible to deliver a message, if applications never run on the same time?
> I guess they mean, it doesn't require applications itself, but it requires
> SqlServer instances to connect each other. Right?
>
>
>
>
>

Alan Brewer [MS]

3/23/2007 6:05:00 PM

0

This is to answer the further questions you posted in comp.db.ms-sql, but
keep the answers on the same thread with Remus's and Roger's answers.

You asked if the retries are time-consuming and if they are configurable.
The short answers are that the retries should not be time-consuming or a
performance issue, and they are not configurable, but do adjust to longer
intervals between retries if multiple retries do not succeed.

The basic retry mechanism is described in the "Message Acknowledgement"
section of the "Service Broker Communication Protocols" topic in the SQL
Server 2005 Books Online:
http://msdn2.microsoft.com/en-us/library/ms1...

As your application issues SEND statements to the sending instance of SQL
Server, the messages are put into a transmission queue. If the receiving
instance of SQL Server is not currently running, the messages remain in the
transmission queue. The sending instance will periodically attempt to
connect to the recieving instance, and if it cannot connect it will wait and
retry the connection later. The wait interval starts out at a few seconds,
and gradually increases to about a minute. So if the receiving instance of
SQL Server is down for an extended period, the sending instance will be
attempting a single connection each minute. When the receiving instance
comes back online and the sending instance successfully connects, the
sending instance will then start sending all of the messages that are stored
in the transmission queue. So the two sets of application code (whatever
code is issuing the SEND and whatever code is issuing the RECEIVE) never
have to run at the same time, but at some point both instances of SQL Server
have to be running at the same time to be able to transfer the messages.

--
Alan Brewer [MSFT]
SQL Server Documentation Team

Download the latest Books Online update:
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/...

This posting is provided "AS IS" with no warranties, and confers no rights.