How can we help you today? How can we help you today?
juliangoldsmith
Thanks, Alex. After doing a bit of digging, I found out that my issue was completely unrelated to the static data.  My problem only happened in stored procs, and only certain ones. It turns out that some of our stored procs use a linked server to access the database they're running on.  (Presumably, due to the magic of copy and paste.)  The issue only happens when I try to update more than one stored proc that uses the linked server. What I think was happening, is that when SQL Source Control tried to update the procs, it locked the sys tables that handle object lookups, as part of a transaction.  Later in the same transaction, SQL Server tries to check that all the objects referenced in the stored procedure exist, and tries to look at the sys tables on the linked server.  Since it's going through a linked server, SQL Server tries to get a new lock on the sys tables, rather than use the one it already has open.  That, of course, deadlocks with the lock that SQL Source Control already has. My solution here is going to be to simply remove any loopback linked server references in my stored procedures.  They're pretty pointless, and make the queries harder to read anyway. / comments
Thanks, Alex.After doing a bit of digging, I found out that my issue was completely unrelated to the static data.  My problem only happened in stored procs, and only certain ones.It turns out that ...
0 votes