|
Archives of the TeradataForumMessage Posted: Thu, 27 Mar 2009 @ 01:37:40 GMT
Ronald- It sounds like you are on your way but below is an article that may help. Use "blocker" to identify lock conflict and "tran" to drill down to identify the session holding the lock. -dave.clark ------------------------------------ Below is a procedure to convert the session number from the lokdisp utility output into the same format that you see in querysessn or pmon Here is sample lokdisp output which shows a session number of 12,22532 > > start lokdisp start lokdisp Started 'lokdisp' in window 1 at Wed Aug 15 14:31:48 2001 Input Supervisor Command: > > root@ada# cnsterm 1 Attempting to connect to CNS...completed. HelloLOCK DISPLAY UTILITY Command String Syntax: Help or ? TRan [ProcId Uniq1 Uniq2] | [ALL] Db [DBname] | [ALL] TAble [DBname.Tablename] | [ALL] ROWRange [DBname.Tablename TypeAndIndex] | [ALL] ROWHash [DBname.Tablename TypeAndIndex, RowHash1 RowHash2] | [ALL] Blockers [TRAN [ProcId Uniq1 Uniq2] | [ALL]] | [LIMIT [Number] | [NONE]] Quit -> Please enter your selection from the list: > > tran a tran a - The following amps are available: 0 1 -> Which amp(s) do you want to request on (S=Sampling/A=all/C=cancel/Q=quit): > > A GRANTED LOCK REQUEST(S): Tran: 16298 01520CB0 Host: 1076 Session: 12,22532 Mode: WR User: EPDWC021 Database: DBC Table: SESSIONTBL Row Hash1: 53984,33413 To convert this number into the format that qrysessn uses do the following: Suppose we get session number 12,22532. Multiply the first part before the comma (12) by 65536 then add to that the number after the comma (22532). (12 * 65536) + 22532 = 808964 Here is sample qrysessn output: Host Session PE DBC User ID ----- ------- ----- ----------- 52 808964 16298 EPDWC021 Additional Information/Comments: Two UNIX scripts have been created to do the conversion for you they are avaiable on all of the DBS team test systems in /usr/bin for Teradata employees only (see attached). babbage# lokdisp2qrysessn 17,58714 The session 17,58714 in qrysessn format is: 1172826 The session in hexadecimal is 11E55A babbage# qrysessn2lokdisp 1172826 The session 1172826 in lokdisp format is: 17,58714 The session in hexadecimal is 11E55A ------------------------------------------------------------------- lokdisp2qrysessn ------------------------------------------------------------------- #!/bin/ksh if [ "$1" == "" ] || [ "$2" != "" ];then echo " " echo "usage: lokdisp2qrysessn ------------------------------------------------------------------- qrysessn2lokdisp ------------------------------------------------------------------- #!/bin/ksh if [ "$1" == "" ] || [ "$2" != "" ];then echo " " echo "usage: qrysessn2lokdisp
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||