---- Start
DB2 SQL error: sqlcode:-911, sqlstate: 40001, sqlerrmc: 2
Message: The current transaction has been rolled back because of a deadlock or timeout. Reason code "2 ".
Yesterday, I executed a simple SQL statement but failed to execute it. The above error is a deadlock. Since it is a deadlock, You can execute it later. After waiting for a while, the deadlock still persists. Which transaction is locked with which transaction? After half a day of query, I found that the data volume updated in the original SQL statement was very large, resulting in a lock upgrade, and then the lock upgrade failed again, resulting in a deadlock. The original lock upgrade failure will cause a deadlock. Therefore, we should usually adjust the locklist and maxlock parameters to a large enough value to avoid lock wait and lock upgrade, so as to maximize the database concurrency.
--- For more information, see:DB2 Essentials
----Statement: indicate the source for reprinting.
---- Last updated on 2010.3.15
---- Written by shangbo on 2010.3.15
---- End