Quantcast
Channel: SQL Service Broker forum
Viewing all articles
Browse latest Browse all 461

SqlDependency and OnChange called too frequently w/ no real data changed...

$
0
0

I'm seeing a case where I have a datatable called LOAD_LINE, where 1 of the columns (named Modified_Type) is a nvarchar(1).  When I include that column in my select for SqlDependency, I am getting called back with numerous rows changed [on the order of 7000+], but data has only actually changed on 4 rows...

What I see is, when I load the "changed" data into a DataTable, and then write it out in XML format, that if I write out the XML version of the data returned, original vs. changed, I see this for the 7000+ rows:

ORIGINAL DATE  <Modified_Type />

"CHANGED" DATA  <Modified_Type xml:space=”preserve”></Modified_Type>

If I remove this column from my select using SQLDependency, the problem goes away, and I don't receive callbacks on updated data for 7000+ rows, just the 4 that really changed.

What could be causing the extraneous notifications here, and how can I work around this issue and still do the select with this column?

Scott


Viewing all articles
Browse latest Browse all 461

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>