SAP Program RSDB4LCK - iSeries: Database Lock Monitor

Description
RSDB4LCK is the SAP database lock monitor for SAP systems on IBMiSeries.
This is an online monitoring tool for detecting and analyzing databaselock situations.
A database lock situation is a situation where several jobs compete fora lock on one (or more) rows(s) of a physical file member with update orread stability intent; one job obtains the lock, the remaining jobs haveto wait until this lock is released.
For SAP systems this means:

  • The jobs competing for a lock are the database shadow jobs of the
  • application servers (each work process of an application server has onecorresponding iSeries job on the database server: the shadow job).
    • The rows of a physical file member are the records of an SAP database
    • table (an SQL table is a physical file with exactly one member).
      To find out the jobs waiting for a record lock to be released on OS/400,use the command WRKACTJOB. The job status is LCKW. To display allrecord locks the job is holding (status HELD) or waiting for (statusWAIT), choose option 11 (Work with locks) on the WRKACTJOBdisplay, followed by F10 (Display job record locks). To display the jobholding this lock and all jobs waiting for the release of this lock,choose option 5 (Display member record locks) on this screen.
      The SAP database lock monitor works in basically the same way.
      On the first screen, a list of all SAP application servers currentlyrunning is displayed. Select the application servers to be analyzed. Onthe next screen, the database shadow jobs for all application serversselected are displayed.
      All 'interesting' jobs with status LCKW are highlighted.
      If you select a job (by double-clicking on a line), all record locks forthis job are displayed. The lock status indicates whether the job iswaiting for the record lock to be released (WAIT) or holding the recordlock (HELD). If you select a record lock, all jobs waiting for thisrecord lock to be released (lock status WAIT) and the job holding thelock (lock status HELD; this field is highlighted) are displayed.
      You can toggle between the list of record locks of one job and the listof all jobs waiting for or holding a record lock by selecting a line ofthe display.
      On both lists you can display the content of the record currentlycompeting for a lock provided the physical file is a table known withinthe ABAP Dictionary.
      On all lists you can display the iSeries job log for a job selected. Ifthe job is an SAP work process or a shadow job of an SAP work process,there is a message at the beginning of the job log with message IDSAP400 detailing, which SAP work process of which application server(SAP internal work process number as listed in transaction SM50) isconnected to the database.

      Precondition
      Valid only for SAP systems on IBM iSeries.