Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to push the data from database to application instead of application pull the data.I have installed ms sql server and apache tomcat server. I have my application in apache tomcat, here I made connection to database. Now I want database send the data whenever there is update in data. But all I know is fetch the data from database is not good idea, because application needs to monitor the database for updated data will lead to fire the query for every 5 sec, this is not efficient as well.

I read some tutorials in Google for this, Finally I found one method name as Query Notification is useful as per requirements.But I don't know how to implement.

  1. Tell me, query Notification is it good way for me.
  2. where will I get good examples.
share|improve this question
You'll have to consult the client stack documentation to see if there's something built in already. If this was .NET land, there are classes built in that leverage the query notification system, and I could give you an answer. An alternative is to still poll periodically, but poll a cache table (or implement change tracking) instead of polling the data directly. – Jon Seigel Jun 20 '13 at 13:23
Look at SqlDependency. – Remus Rusanu Jun 20 '13 at 21:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.