all groups > sql server notification services > february 2006 >
You're in the

sql server notification services

group:

How can I use Notification Services to notify my applications


Re: How can I use Notification Services to notify my applications Joe Webb
2/24/2006 12:00:00 AM
sql server notification services:
Are you using SQL Server 2005? If so you've got a couple of options.

1) SQLNS may be a good fit for you - I cannot tell based on what
you've described in your OP. Here's a link to another thread that
describes how to set up a custom delivery protocol (using v2.0 but it
should at least point you in the right direction).
http://groups.google.com/group/microsoft.public.sqlserver.notificationsvcs/browse_thread/thread/4fe82e37a9f41a6c/bdb7a17b5beb5d31?q=attachments&_done=%2Fgroup%2Fmicrosoft.public.sqlserver.notificationsvcs%2Fsearch%3Fgroup%3Dmicrosoft.public.sqlserver.notificationsvcs%26q%3Dattachments%26qt_g%3D1%26searchnow%3DSearch+this+group%26&_doneTitle=Back+to+Search&&d#bdb7a17b5beb5d31

2) You can also look into Query Notifications, too. That may be a good
alternative, depending on your needs.
http://msdn2.microsoft.com/en-us/library/t9x04ed2.aspx


HTH...



--
Joe Webb
SQL Server MVP
http://www.sqlns.com


~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)


On 24 Feb 2006 00:22:43 -0800, "oleksa borodie"
[quoted text, click to view]
How can I use Notification Services to notify my applications oleksa borodie
2/24/2006 12:22:43 AM
Hello.

I'd like to use SQL 2005 Notification Services to notify my .Net
application about some events. In few words it will look like that:

- my application starts and subscribes to some events
- notification service notify my application about some events
I don't know how many application instances will be started at one
time, approx values are from 0 to 30.
I understand Notifications services features generally. Unfourtanetly
I cann't understand how to build custom delivery channel. I need that
Notification Services instance call method defined in my application if
event occurs. All samples from SQL server installation contains file
and e-mail delivery endpoints but this endpoints are not suitable for
me.

Could you help me please and post some links to the custom delivery
channel development manuals, HOWTOs, FAQs?

Thank you.
Re: How can I use Notification Services to notify my applications kate
2/26/2006 3:23:06 PM
Query Notifications will be good if the data you need to monitor can
take an indexed view (which is what drives QN). If the data won't (and
their are lots of conditions that rule out indexed views) then using
NS would be a good choice. To deliver to your app you use the same
mechanics an QN but set up a custom version. The QN delivery is via
Service Broker which allows your app instance to subscribe to a service
broker queue to raise an event when their is a new message. In this
case the message will be the revised data that you NS service has
dropped into the queue.

so you would need to read up on Service broker and creating an
sqlclient sqldependancy in your .net app. try the Rational guide to SB.

hope that helps

kate
Re: How can I use Notification Services to notify my applications oleksa borodie
2/27/2006 1:07:23 AM
Hello Joe.

Thank you for link. It is very interesting for me since I use SQL
2005.

Unfourtanetly AFAIU using SQLNS is very complicated in my case. SQLNS
should be used for large subscribers amount on large systems.

QueryNotification is a bit more suitable. I performed some tests and
found that
- it requires full-time separate connection (so +30 connections will
be opened all time)
- after client got new record in the queue it will be unsubscribed
from Query Notification and should perform initial SELECT to receive
events. It looks like sequence subscribe-receive-subscribe-receive...
- if two or more clients are subscribed to the same notification only
the last one will receive notification since RECEIVE will remove
message from queue. So I should create one queue for one client or
execute SELECT instead of RECEIVE when client looks for new events in
the queue.

I've considered all mentioned above and found that the best solution
will be fill QUEUE on the SQL server in the procedure and pull QUEUE
from client with SELECT. If I replace QUEUE with table I'll get old
good solution without queues, services, contracts and messages. All
will be clear and easy.

Thank you
AddThis Social Bookmark Button