文档上说oracle12c,当一个行锁是aquired.That时需要一个表锁,这在sql server中是不是这样的,这是非常令人费解的。
A row lock, also called a TX lock, is a lock on a single row of a table. A transaction acquires a row lock for each row modified by one of the following statements: INSERT, UPDATE, DELETE, MERGE, and SELECT ... FOR UPDATE. The row lock exists until the transaction commits or rolls back.
***When a transaction obtains a row lock for a row, the transaction also acquires a table lock for the table in which the row resides***. The table lock prevents conflicting DDL operations that would override data changes in a current transaction.有人能解释一下这一点吗?
发布于 2017-01-04 05:17:03
发生的表锁是共享锁。同一个表上可以同时有任意数量的共享锁:它们不会相互干扰。
它们所做的就是阻止任何东西获取该表上的排它锁:比如说,改变表的结构。
https://stackoverflow.com/questions/41452464
复制相似问题