DBUTLTY COMM STATUS not displaying LOCKs
search cancel

DBUTLTY COMM STATUS not displaying LOCKs

book

Article ID: 47123

calendar_today

Updated On:

Products

Datacom DATACOM - AD Datacom/AD Datacom/DB

Issue/Introduction

CA7 or CA11 provides Datacom DBUTLTY BACKUP job samples which include LOCK and UNLOCK clauses around the BACKUP statement.
These DBUTLTY Backup jobs have two steps, one to take the Backup and one to UNLOCK any pending LOCKs in case the first step has failed. 
In a recent case the UNLOCK step did not run and the BACKUP failed. This can cause a hang situation.
The DBUTLTY COMM STATUS console command did not show all the LOCKs.

How can the outstanding LOCKs be listed?

Environment

Release: 15.1

Resolution

DBUTLTY COMM STATUS is a diagnostic tool to display activities at some point in time.  
If a job is hanging due to a LOCK or LOCKs then DBUTLTY COMM STATUS will display details about the first LOCK the job is waiting for. 
If the job is canceled for any reason then DBUTLTY COMM STATUS will not display the pending LOCKs if any.

The best way to display these LOCKs is by using the following SQL request:

SELECT MUF_NAME, LOCK_VALUE FROM SYSADM.MUF_LOCKS_VALUE
       WHERE SUBSTR(LOCK_VALUE,1,6) = 'DBSMVR';

Result:

MUF_NAME     LOCK_VALUE        
CHAR(8) N.N. CHAR(64) NOT NULL 
____________ __________________
LV1151BG     DBSMVR    3 DQW   

The LOCK_VALUE will include “DBSMVR” followed by the DBID and Area involved. In the above example the dbid is 3 and the area is DQW.

You need to have as many UNLOCKs as LOCKs to get rid of any LOCK situation.
If there were two previous  LOCKs  done then you would need at least two UNLOCKs to get rid of the hang situation.
The number of UNLOCKs done does not matter as long as it is greater than the number of LOCKs.     

Additional Information

   See documentation sections LOCK (Lock a Data Area) and UNLOCK (Unlock a Data Area).