Sample Header Ad - 728x90

Expected behaviour of query notifications

-1 votes
1 answer
226 views
I am using the Microsoft ODBC driver on a Linux system to connect to SQL Server 2012 on Windows to use the Query Notification feature. I run my C code and can see my subscription appear in sys.dm_qn_subscriptions as I expect, then my code sends a WAITFOR and blocks - fine so far. Then I do a transaction that will trigger the notification, and I get it - still fine. What I would like to do is then process the notification and loop around again to WAITFOR but after the first notification my subscription no longer appears in the DMV. My question is, is this the intended behaviour and I should re-subscribe every time, or is something weird happening?
Asked by Gaius (11238 rep)
Nov 28, 2017, 08:15 PM
Last activity: Nov 29, 2017, 01:50 AM