![]() So when the later procedure called, it is deadlocked, on this X locks, cause it tries to get X lock on whole table, and for that it need to lock wait till other sessions release the X locks on the rows, which in turn waiting on other to do the same. this locks are held till the end of the outmost transaction. this in turn acquiring a IX lock on table, and then if it delete any row while running, it acquiring row X lock on the deleted row. (in the same transaction) that making cleanup in the table, via DELETE instruction. The problem is that before procedure runs, the calls the ![]() on the table while opening a local cursor with a table hint. We have investigated the issue deeply, and found that the deadlocks are happening when the trying to convert the IX (Intent Exclusive) lock to X (Exclusive). We have stumbled the same issue, thank you John for identifying the problem and sending us to the right direction.Īs John mentioned the issue is with the procedure. We have raised a call with ESRI support, but are looking for anyone else who may be having a similar problem, and better still, has a solution!. Putting these calls in half a dozen sql streams and running them all against each other (using a copy of live geodatabase with a "sde.SDE_state_locks�?� table populated with a few thousand dummy entries) I was able to reproduce the deadlock situation. The deadlock relates to objectname="sde.SDE_state_locks�?� table and is being called by sde.SDE_state_check_lock_conflicts and sde.SDE_state_lock_def_insert stored proceduresīy using SQL trace I was able to extract out lots of calls to these stored procedures. The error message from ArcObjects is: Īt the same time our SQL 2008R2 deadlock monitor reports a deadlock (and the victim is the one that gets the above error message) The error number from ArcObjects is: '-2147216072'. Please check that the connection parameters specified are correct. We also see the following in some of the FME jobs running at the same timeĬould not open the Enterprise Geodatabase. Ĭontainer process xxx has crashed on machine xxxx The base table definition string 'zzzzzz' is invalid. After getting the blocking_session_id, you can use another dmv SYS.DM_EXEC_SESSIONS to get more details about the session or connection.Under very heavy load (we were refreshing lots of cached area all at the same time) we get the following warning and error in ArcGIS log In this statement, the column blocking_session_id gives you the session_id of the connection which is blocking and the column wait_type gives you the type of wait which caused the deadlock. This statement is based on the SYS.DM_EXEC_REQUESTS dynamic management view. It also helped us to identify and fix the frequently blocking SQL statement.īelow is the query I have used to quickly find the deadlocks. ![]() Based on the details returned by this statement, I was able to find the application or user which has executed the blocking session and helped me to kill the specific SQL connection. During such situations, I used a light weight T-SQL query to find deadlocks i.e, blocking and blocked session-ids of SQL connections. However, In the development environment, I came across situations where the ongoing long duration deadlocks appearing when multiple developers trying to execute dml statements against a table. Extended events will be a great help to track the deadlocks happened on the server for short period of time, especially on a production environment. Earlier, I wrote an article about using extended events to to find the deadlocks occurring on a SQL Server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |