The LOCK TABLE command can be used to lock a table instead of using the default row locking.
可使用LOCK TABLE命令来锁定一个表,而不是使用缺省的行锁定。
Create a DB2 table (hereafter referred to as lock table) to define the resources related to session locking.
创建一个db2表(在下文中称为锁表(lock table)),它定义与会话锁定相关的资源。
Within the child thread, open a new connection to DB2 and fetch a row from the lock table for the requested resource ID.
在子线程中,打开新的DB 2连接,在锁表中获取具有所请求的资源ID的一行。
When performing many updates, lock the entire table for the duration of the transaction before updating (using the SQL lock table statement).
当执行大量更新时,更新之前,在整个事务期间锁定整个表(使用SQLLOCK table语句)。
The maximum number of applications allowed to access a resource concurrently is defined by the number of rows for this resource in the lock table.
锁表中一个资源的行数决定了可以同时访问这个资源的最大应用程序数量。
When having duplicate rows in the lock table (see the Create a DB2 table for resource locking section), concurrent use of the resource is possible.
如果锁表中有重复的行(参见为资源锁定创建一个DB 2表一节),就可以对资源进行并发使用。
With this type of lock, concurrent applications can read from or write to the locked table.
有了这一类型的锁,并发应用程序就可以读或写已锁定的表。
The database manager determines which locks to escalate by looking through the lock list for the application and finding the table with the most row locks.
数据库管理器通过查看应用程序的锁列表并查找行锁最多的表,来决定对哪些锁进行升级。
If after replacing these with a single table lock, the MAXLOCKS value is no longer exceeded, lock escalation stops.
如果用一个表锁替换这些行锁,将不再会超出maxlocks值,那么锁升级就会停止。
The only alternative to a lock on every new row is a table lock (since there are no page locks in DB2).
对于每个新行之上的锁,惟一可以替代的是表锁(DB 2中没有页锁)。
For table Spaces containing more than one table, when DB2 acquires locks on a table, that lock does not affect access to segments of other tables.
对于包含多个表的表空间,当DB 2取得用于某一个表的锁时,这个锁不会影响对其他表的段的访问。
When a table holds a Z lock, no concurrent application can read or update data in that table.
当表持有z锁时,任何并发应用程序都不能读取和更新该表中的数据。
We are now ready to export the data from the NEWSTAFF table, and to simultaneously capture a database lock snapshot.
现在我们已经准备就绪,可以从newstaff表导出数据,并同步捕获数据库锁快照了。
When a table holds an IX lock, the lock owner and concurrent applications can read and update data in that table.
当表持有IX锁时,锁拥有者和并发应用程序可以读和更新该表中的数据。
This means that an exclusive lock is always placed on the indexed table while a functional index is being created or dropped.
这说明,在创建或删除函数索引时,执行索引的表中始终持有一个排他锁。
When you use the ONLINE keyword, DDL operations execute without applying an exclusive lock to the table on which the specified index is defined.
在使用ONLINE关键字时,DDL操作是在没有将排它锁应用于定义特定索引表的情况下执行的。
If you attempt to alter a table to use this lock size option, and it isn't an MDC table, you will receive an SQLSTATE 628n error.
如果您尝试修改一个表,以便使用这种锁粒度选项,而那个表又不是mdc表,那么您将收到一个SQLSTATE 628n错误。
As all rows in the EMPLOYEE table are X-locked by the first transaction, the second application goes into lock wait mode.
由于employee表中的所有行都被第一个事务独占锁定,第二个应用程序进入了锁等待模式。
This is because the new X row lock and the is table lock are not compatible.
这是因为新的x行锁定和is表锁定是不兼容的。
Shortages in the lock maintenance space can lead to so-called lock escalations, in which row locks are escalated to undesirable table locks, which can even lead to deadlock situations.
锁维护空间不足可能会导致所谓的“锁提升”,其中,行锁被提升为不必要的表锁,这甚至可能会导致死锁情况。
If only a single type of lock can be associated with the given table, then it may make sense to add extra columns to the original table to control the locking.
如果只有单一类型的锁关联到给定表,那么可以添加额外的列到原始表中来控制锁定。
Confirm that the server has a sufficient number of lock resources to alter the associated delete table along with the replication table.
确信服务器有足够的锁资源数,用以修改相关的删除表和复制表。
If the collected lock event data should not be kept for further analysis purposes, the unformatted event table must be dropped manually using the drop table statement, as shown in Listing 22.
如果不需要保留所收集的锁事件数据用作将来的分析,必须使用DROPtable语句手动删除非格式化事件表,如清单22所示。
Listing 2 shows part of a lock snapshot taken during such an import operation into a table named NEWSTAFF2, which was created to be like the NEWSTAFF table.
清单2展示了在表newstaff2的导入操作期间截取的一个锁快照的一部分,其中newstaff2创建成像newstaff表一样。
After some small number of row locks are obtained, a lock escalation to a table lock will occur automatically.
当获得少量的行锁时,行锁就会自动地逐渐升级为表锁。
The s lock allows concurrent applications that use read-only queries to access the target table, but applications attempting to write data to the table are prevented from doing so.
s锁允许使用只读查询的并发应用程序访问目标表,但是防止应用程序写数据到表中。
Application 2 can establish an IX lock on the table and an X row lock, because the table lock IX is compatible to the IN table lock from A1.
应用程序2可以在表上建立一个IX锁定和一个x行锁定,因为表锁定ix兼容a1的in表锁定。
RR does not allow phantom reads by creating an S (share) table lock when selecting rows.
RR不允许幻象读取,它会在选择行时创建一个S(share)表锁定。
The import utility accomplishes this by requesting an exclusive (X) lock on the table at the beginning of an ALLOW NO ACCESS import operation.
import工具实现这一点的方法是在ALLOWNOACCESS导入操作的开始请求目标表上的一个排他(X)锁。
The import utility accomplishes this by requesting an exclusive (X) lock on the table at the beginning of an ALLOW NO ACCESS import operation.
import工具实现这一点的方法是在ALLOWNOACCESS导入操作的开始请求目标表上的一个排他(X)锁。
应用推荐