The DB command displays granted and blocked databases-level locks.
Syntax
{ DB | D } [ DBname | ALL ]
Syntax Elements
- DBname
- The name of a database.
- ALL
- That all databases that have a database-level lock request will be considered.
Usage Notes
The following table shows the components of DB command output.
Component... | Specifies... |
---|---|
Tran | currently running transactions with locks being applied. |
Host | the logical host ID (the origin of the transaction). |
Session | the session number for the transaction. |
Mode | the lock mode:
|
User | the logon-ID for whom the lock is being requested. |
Database | the name of the database with granted or blocked locks. |
Examples: DB command examples
The following example shows locks on a sampling on all AMPs for the RECBDQTAC database:
>lokdispResult:
Amp Utility LOCK DISPLAY UTILITY LOCK DISPLAY UTILITY Command String Syntax: Help or ? TRan [ProcId Uniq1 Uniq2] | [ALL] Db [DBname] | [ALL] TAble [DBname.Tablename] | [ALL] ROWRange [DBname.Tablename TypeAndIndex] | [ALL] ROWKey [DBname.Tablename TypeAndIndex, Partition RowHash1 RowHash2] | [ALL] Partition [DBname.Tablename TypeAndIndex] | [ALL] Blockers [TRAN [ProcId Uniq1 Uniq2] | [ALL]] | [LIMIT [Number] | [NONE]] Quit -> Please enter your selection from the list: db - 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): a> a ---------------- AMP 0 REPORTS 1 LOCK ENTRIES ------------- GRANTED LOCK REQUEST(S): Tran: 16383 00000114 Host: 2049 Session: 0, 1000 Mode: WR* User: DBC Database: RECBDQTAC ---------------- AMP 2 REPORTS 1 LOCK ENTRIES ------------- GRANTED LOCK REQUEST(S): Tran: 16383 00000114 Host: 2049 Session: 0, 1000 Mode: WR* User: DBC Database: RECBDQTAC
The following example tries to display database-level locks while trying to create database USER1. The first lock is an Intentional Write Lock on database DBC (user DBC), and the second lock is an Intentional Exclusive Lock on database USER1 (user DBC).
LOKDISP >> DB ALLResult:
- The following amps are available: 0 -> Which amp(s) do you want to request on (S=Sampling/A=all/C=cancel/Q=quit): A ---------------- AMP 0 REPORTS 2 LOCK ENTRIES ------------- GRANTED LOCK REQUEST(S): Tran: 16383 000008B8 Host: 7169 Session: 0, 1010 Mode: WR* User: ?????????????????????????????? Database: ?????????????????????????????? Host: 7169 Session: 0, 1010 Mode: EX* User: ?????????????????????????????? Database: ??????????????????????????????