DB2 在执行索引或表扫描时,如果遇到一个被另一个事务独占 (X) 锁定的未提交行,那么 DB2 将阻塞在行锁上。
When DB2 performs an index or table scan, DB2 will block on a row lock when it comes across an uncommitted row which another transaction has exclusively (X) locked.
我们会以独占模式锁定表。
由于employee表中的所有行都被第一个事务独占锁定,第二个应用程序进入了锁等待模式。
As all rows in the EMPLOYEE table are X-locked by the first transaction, the second application goes into lock wait mode.
应用推荐