Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

Deadlocks: How do I avoid them in this scenario?

$
0
0

I have a WCF process that executes continually 24/7 importing data from a hosted environment to a local mssql 2012 server. One of the things that occurs within this process is that the incoming XML is passed over to a stored proc that writes to several tables in one single transaction. This process has worked for the past 3 years, however, lately the end users want to look at the arriving data in an ever increasing shorter time frame.  

The data from the shredded xml that gets written is currently being exposed as a view. I've been seeing deadlocks on the core tables that comprise this view from the process that is going to the view to import the data elsewhere. Any advice on the best way to avoid the deadlocks on the read while the transaction is active? A dirty read with (nolock) hint would not work as this would not bring back the full complement of data.


Viewing all articles
Browse latest Browse all 5123

Trending Articles



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