The solution must avoid session lock timeouts and long wait for locks.
解决方案必须避免会话锁超时和长时间等待锁。
This would have showed us similar information, but at a session level, so we could have seen that our session had done an inordinate number of sequential scans and lock requests.
这将为我们展示类似的信息,但是在会话级别,因此我们会看到会话做了过多的顺序扫描与锁定请求。
It returns the most recently committed version of the rows, even if another concurrent session holds an exclusive row-level lock.
即使另一个并发会话持有一个独占式行级锁,它仍然返回最近提交的行。
A special case of the session locking pattern, mentioned above, is the need for a single lock on a set of tables.
如前面所提到的,会话锁定模式中的一个特例是需要对表集合施加单一的锁。
The solution must provide a conceptual session lock per resource that is visible between applications.
解决方案必须为在应用程序之间可见的每个资源提供一个概念性的会话锁。
Since pessimistic session locks can be removed as described above, the application that obtained the lock should always check to see if it is still in force before updating data.
如上所述,由于可以删除悲观会话锁,因此获得锁的应用程序始终需要在更新数据之前检测锁是否有效。
Assume that the scope of a logical session lock is some kind of resource identifier.
假设逻辑会话锁的范围是某种资源标识符。
This is weaker than a pessimistic session lock -- the convention adhered to by the participants is to warn, not to block.
它较悲观会话锁更弱一些,相关方约定发出警告,而不是阻止。
In the first session, execute the UPDATE statement shown in Listing 16, which places an exclusive lock on the row with department number B01.
在第一个会话中,执行清单16中的update语句,它对部门号为B01的部门行设置独占锁。
Create a DB2 table (hereafter referred to as lock table) to define the resources related to session locking.
创建一个db2表(在下文中称为锁表(locktable)),它定义与会话锁定相关的资源。
For your lock Report, you will display a list of the current active sessions on the database server and the number of locks associated with each session. Here is the code to do this.
您将为LockReport显示数据库服务器上当前活动会话的列表,以及与每个会话相关的锁的数量。
Now let's start session 2 and have it update another row in the Orders table. Same situation – session acquires and holds X lock on the row with (ID = 2).
现在,我们开启会话2也更新订单表,不同的是更新的数据行为Id=2,同样的在数据行Id=2上也会申请排它锁至到更新事务的结束。
You may also attach a previously loaded object to a new Session with update() or lock() before accessing unitialized collections (or other proxies).
你也可以把先前装载的对象附加到一个新的Session去,需要在访问未初始化的集合类(或其他代理)前使用update() 或lock()。
You may also attach a previously loaded object to a new Session with update() or lock() before accessing unitialized collections (or other proxies).
你也可以把先前装载的对象附加到一个新的Session去,需要在访问未初始化的集合类(或其他代理)前使用update() 或lock()。
应用推荐