SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How can I write a query for notification request?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

niren
Starting Member

India
18 Posts

Posted - 06/21/2013 :  05:40:31  Show Profile  Reply with Quote
This is my perivous question http://stackoverflow.com/questions/17207550/how-to-push-the-data-from-database-to-application in stackoverflow about how to push the data from database instead of application pull data.

After went through the link http://rusanu.com/2006/06/17/the-mysterious-notification/ and the documents I come to know that I need to write a query in application side for notification request then the DB will register my request in subscription and If there is any change in the DB it will check subscription, if the request is there it will send the message to the client.

This para is from the above mentioned link

Along with the query submitted for the notification, the client submits a service name
and a broker instance. Each notification subscription begins a Service Broker dialog
with this provided service and broker instance. When data is changed and the change
would affect the result of the submitted query result, a message is sent on this
dialog. By sending this message, the client is considered notified and the notification
subscription is removed. If client desires to be notified on further changes, is
supposed to subscribe again.

Now I don't know how to write a query in application side for notification request and I don't under stand `submit a service and a broker instance` from the above given para. I guess the service and broker instance needs to be created in application before query the database for notification request. If it is so how to create service and a broker instance?

I can check the DB server for subscription by `select * from sys.dm_qn_subscriptions` command. can anyone help me?

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 06/21/2013 :  05:47:13  Show Profile  Reply with Quote
I think it speaks of using server broker feature

http://gavindraper.com/2012/06/03/sql-server-service-broker-explained/

which is exactly what James suggested you here

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=186141

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000