Quantcast
Viewing all articles
Browse latest Browse all 12963

MERGE with Linked Server Query

Hello

I'm trying to troubleshoot a query for a developer that is exclusively locking a number of system tables during execution for several minutes:

sysschobjs
sysallocunits
syscolpars
sysrscols
sysidxstats

The query is a MERGE statement that uses a linked server in the SELECT to join tables from a database on a remote server with a local table. The merge is on a local table. My suggestion has been to redevelop the stored proc and use SSIS to negate the need for a linked server. I would still like to understand this further as I am unable to explain why the system tables are being locked exclusively when only one local user table is being updated?

Thanks

Adam



Viewing all articles
Browse latest Browse all 12963

Trending Articles



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