MSSLOCK7 SAP (MS SQL Server lock monitor) Structure details
Description: MS SQL Server lock monitor
Structure field list including key, data, relationships and ABAP select examples
MSSLOCK7 is a standard SAP Structure so does not store data like a database table does. It can be used to define the fields of other actual tables or to process "MS SQL Server lock monitor" Information within sap ABAP programs.
This is done by declaring abap internal tables, work areas or database tables based on this Structure. These can then be used to store and process the required data appropriately.
i.e. DATA: wa_MSSLOCK7 TYPE MSSLOCK7.
The MSSLOCK7 table consists of various fields, each holding specific information or linking keys about MS SQL Server lock monitor data available in SAP. These include SPID (SQL Server process ID), KPID (Windows operating system thread ID), STATUS (SQL Server process status; ie sleeping, running etc.), USERNAME (The user name used to log into the SQL Server database).. See below for full list along with technical details, documentation, text table, check tables, foreign key relationships, conversion routines, relevant tcodes and example ABAP select code etc. .
Delivery Class:Display/Maintenance via tcode SM30: Display/Maintenance Allowed but with Restrictions
SAP enhancement categories: Not classified
SAP MSSLOCK7 structure fields - Full list of fields found in SAP data dictionary
Field | Description | Data Element | Data Type | length (Dec) | Check table | Conversion Routine | Domain Name | MemoryID | SHLP |
SPID | SQL Server process ID | MSQSERPRID | INT4 | 10 | INT4 | ||||
KPID | Windows operating system thread ID | MSQTHREDID | INT2 | 5 | INT2 | ||||
STATUS | SQL Server process status; ie sleeping, running etc. | MSQPRSTAT | CHAR | 60 | CHAR60 | ||||
USERNAME | The user name used to log into the SQL Server database | MSQUSRNAME | CHAR | 128 | CHAR128 | ||||
HOSTNAME | Hostname of the application server logged into SQL Server. | MSQHOSTNE | CHAR | 128 | CHAR128 | ||||
PROGNAME | Name of the application program which owns the connection. | MSQPRONE | CHAR | 128 | CHAR128 | ||||
HOSTPID | The application program's process ID on the given host | MSQWKPROID | CHAR | 16 | CHAR16 | ||||
EXECCMD | Command currently being executed by the given process id | MSQEXECMD | CHAR | 32 | CHAR32 | ||||
BLOCKED | SPID of blocking process. | MSQBLOPRID | INT2 | 5 | INT2 | ||||
WAITTYPE | Wait type of waiting process, reserved field of sysprocesses | MSQWAITTYP | INT2 | 5 | INT2 | ||||
WAITTIME | Current wait time of the process in milliseconds | MSQWAITIME | INT4 | 10 | INT4 | ||||
BINLOCK | MS SQL server - binary lock resource | MSQRSCBIN | RAW | 16 | MSQHEX16 | ||||
LCKVALBLK | MS SQL server - lock value block. | MSQRSCLKBK | RAW | 16 | MSQHEX16 | ||||
INDNAME | Object name | MSSOBJECT | CHAR | 128 | MSSSYSNAME | ||||
LCKSTATUS | MS SQL server - Lock request status | MSQLCKSTAT | INT2 | 5 | INT2 | ||||
LCKREFCNT | MS SQL server - lock reference count | MSQLKRECNT | INT2 | 5 | INT2 | ||||
LCKCARCNT | MS SQL server - lock carry-over reference count | MSQLKCRYCT | INT2 | 5 | INT2 | ||||
LCKLFETIME | MS SQL server - lock lifetime bitmap. | MSQLKLFTIM | INT4 | 10 | INT4 | ||||
ECID | Execution context ID used to uniquely identify subthreads | MSQECID | INT4 | 10 | INT4 | ||||
LCKOWNERTY | MS SQL server - type of object associated with a lock | MSQLCKOWN | INT2 | 5 | INT2 | ||||
DBASENAME | Database name | MSSDB | CHAR | 128 | MSSSYSNAME | ||||
OBJNAME | Object name | MSSOBJECT | CHAR | 128 | MSSSYSNAME | ||||
LOCKRES | Textual description of a lock resource from syslockinfo. | MSQRSCTXT | CHAR | 32 | CHAR32 | ||||
LOCKTYPE | Lock resource type as e. g. KEY or PAGE. | MSQLCKRSC | CHAR | 10 | CHAR10 | ||||
LOCKNAME | Lock request mode translated from table sptvalue. | MSQSPTNAME | CHAR | 35 | CHAR35 | ||||
SAPUSER | The user name in the SAP system. | MSSSAPUSER | CHAR | 12 | |||||
REPORTNAME | Report now running | WPREPORT | CHAR | 40 | WPREPORT | ||||
NESTLEVEL | Nesting level for lock waiters | NESTLEVEL | INT2 | 5 | INT2 | ||||
HPID_TEXT | MS SQL-Server host process ID (decimal) | MSSHPIDTXT | CHAR | 20 | CHAR20 | ||||
SPID_TEXT | MS SQL Server process ID | MSSSPIDTXT | CHAR | 20 | CHAR20 | ||||
STATUS_TXT | Lock status as granted, waiting, or converting. | MSSLCKTXT | CHAR | 10 | CHAR10 | ||||
LCKOWNERTP | MS SQL Server lock owner type (text) | MSSLCKOWNT | CHAR | 12 |
Key field | Non-key field |
How do I retrieve data from SAP structure MSSLOCK7 using ABAP code?
As MSSLOCK7 is a database structure and not a table it does not store any data in the SAP data dictionary. The ABAP SELECT statement is therefore not appropriate and can not be performed on MSSLOCK7 as there is no data to select.How to access SAP table MSSLOCK7
Within an ECC or HANA version of SAP you can also view further information about MSSLOCK7 and the data within it using relevant transactions such asSE11 (ABAP Dictionary Maintenance)
SM30 (Maintain Table Data)
SE80 (Object Navigator)
SE16 (Data Browser).
Search for further information about these or an SAP related objects