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. It's 100% free, no registration required.

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 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 color FROM ColorList

was being executed every 10 milliseconds.

Is this how Query Notification works? Does SQL Server store the results of the original query and then run the query endlessly until it detects a change?

share|improve this question
Don't get to used to using notification services. It's only available in SQL Server 2005. – mrdenny Mar 9 '12 at 19:33
up vote 9 down vote accepted

Read the Mysterious Notification for an explanation on how it works. If you see the query executed every 10ms it means your application is running it every 10ms. My 8 ball is telling me your code does not check the notification EventArgs and is blindly resubmitting the query despite the Info being of the value Invalid, indicating a query than cannot be notified. Which is to be expected, since your query does not conform to the Query Notification restrictions:

The projected columns in the SELECT statement must be explicitly stated, and table names must be qualified with two-part names.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.