Purpose
The ROWRANGE command displays granted and blocked row range locks. A row range lock locks a range of rows (the rows identified by a range of contiguous rowhash values in non-row-partitioned tables or a range of contiguous rowkey values in row-partitioned tables). Rowkey values are described in Locking and Row Partitions.
Syntax
- DBname.Tablename
- The name of a database and the name of a table separated by a required period (.).
- TypeAndIndex
- A subtable identifier.
- ALL
- That all tables that have a rowrange-level lock request are considered.
Usage Notes
The following table shows the components of ROWRANGE command output.
Component... | Specifies... |
---|---|
Tran | the currently running transactions with locks being applied. |
Hash Locks | the total number of rowhash locks applied by the transaction. |
Range Locks | the total number of range locks applied by the transaction. |
Row Range Locks | the number of row range locks applied by the transaction. |
Host | the logical host ID (origin of the transaction). |
Session | the session number for the transaction. |
Mode | the type of lock mode:
|
User | the logon-ID for whom the lock is being requested. |
Database | the name of the database with granted or blocked locks. |
Table | the name of the table with granted or blocked locks. |
PLLKind | the type of partition-level lock that is applied. This only appears for locks on row-partitioned tables. |
Subtable ID | the identifier of the subtable to which the row range lock is applied |
Partition1 and Partition2 | the internal partition numbers of the rowkeys that begin and end the range of locked rows. The internal partition number is part of the rowid of the physical row. It is displayed in hexadecimal as [[[hhhh.] hhhh.] [hhhh.hhhh]] or zero. |
RowHash1 and RowHash2 | the first and second portions of the row hash, representing the row for which lock information is to be displayed. Both decimal and hexadecimal numbers are accepted. A decimal number must be followed by a period. |
In the following examples RPT1 is a row-partitioned table, and NOTRPT1 is a non-partitioned table.
Examples: ROWRANGE command examples
This example shows:
- a write lock on the range of rows beginning at rowhash 1,17 and ending at rowhash 2,17 in a row-partitioned table. Only the rows in partition number 000A are locked.
- a write lock on the range of rows beginning at rowhash 31158,40496 and ending at rowhash 31158,40502 in a non-partitioned table.
-> Please enter your selection from the list: rowrange - The following amps are available: 0 1 2 3 -> Which amp(s) do you want to request on (S=Sampling/A=all/C=cancel/Q=quit): 1 ---------------- AMP 1 REPORTS 2 LOCK ENTRIES ------------- GRANTED LOCK REQUEST(S): Tran: 30719 00015DCA Hash Locks : 1 Range Locks : 6 Row Range Locks: 2 Host: 1025 Session: 0, 1003 Mode: WR User: EXAMPLE Database: EXAMPLE Table: RPT1 PLLKind: RowKey Range Subtable ID: 1024 : Partition1 : 000A Row Hash1: 1, 17 : Partition2 : 000A Row Hash2: 2, 17 Host: 1025 Session: 0, 1003 Mode: WR User: EXAMPLE Database: EXAMPLE Table: NOTRPT1 Row Range Lock Subtable ID: 1024 Row Hash1: 31158,40496 Row Hash2: 31158,40502 -> Please enter your selection from the list: rowrange example.rpt1 400 - The following amps are available: 0 1 2 3 -> Which amp(s) do you want to request on (S=Sampling/A=all/C=cancel/Q=quit): 1 ---------------- AMP 1 REPORTS 1 LOCK ENTRIES ------------- GRANTED LOCK REQUEST(S): Tran: 30719 00015DCA Hash Locks : 1 Range Locks : 6 Row Range Locks: 1 Host: 1025 Session: 0, 1003 Mode: WR User: EXAMPLE Database: EXAMPLE Table: RPT1 PLLKind: RowKey Range Subtable ID: 1024 : Partition1 : 000A Row Hash1: 1, 17 : Partition2 : 000A Row Hash2: 2, 17 -> Please enter your selection from the list: rowrange example.notrpt1 400 - The following amps are available: 0 1 2 3 -> Which amp(s) do you want to request on (S=Sampling/A=all/C=cancel/Q=quit): 1 ---------------- AMP 1 REPORTS 1 LOCK ENTRIES ------------- GRANTED LOCK REQUEST(S): Tran: 30719 00015DCA Hash Locks : 1 Range Locks : 6 Row Range Locks: 1 Host: 1025 Session: 0, 1003 Mode: WR User: EXAMPLE Database: EXAMPLE Table: NOTRPT1 Row Range Lock Subtable ID: 1024 Row Hash1: 31158,40496 Row Hash2: 31158,40502