Enqueue Status Test

The Enqueue service allows ABAP applications to lock data so that only they can use it. The locking of the data avoids parallel changes to the data, which would lead to data inconsistency. The enqueue work process is in charge of the lock management system. It allows multiple application servers to synchronize their access to the database and maintain data consistency. The locks are managed by the enqueue work process using a lock table that resides in the main memory. The enqueue work process sets an SAP lock by writing entries in the lock table; but prior to that, the enqueue work process checks the lock table to determine whether/not the requested lock object is already locked, and if locked, what type of lock is active on the object.

While SAP supports many types of locks, from a performance perspective, the following types are most critical:

  • Exclusive: Exclusive locks are used to avoid parallel modification of the data, which means that exclusively locked data can be displayed or modified by only one user.
  • Exclusive but not cumulative: Locks of this type can be called only once. So a lock request will be rejected if an exclusive lock already exists.

Too many exclusive locks held for long durations can be detrimental to SAP system performance, as they can block users from updating critical transactions. This is why, SAP administrators need to keep track of such locks, promptly detect unreleased locks, and figure out the reasons for the same. To enable this lock analysis, eG Enterprise provides the Enqueue Status test. For each exclusive lock type (i.e., exclusive and exclusive but not cumulative), this test reports the number of locks of that type for which entries exist in the lock table and the number of locks that have remained active over different time periods ranging from 1 hour to over 1 day. In the process, the test points administrators to those lock types that were unreleased for significantly long time windows, thus impacting SAP system performance. Detailed metrics provided by the test will lead administrators straight to the exact locks that were held for broad time frames and the user who held them!

Target of the test : A SAP ABAP instance

Agent deploying the test : An internal/remote agent

Outputs of the test : One set of results for each exclusive lock type and one set of results for an All descriptor that reports aggregated performance results across all lock types.

Configurable parameters for the test
Parameter Description

Test Period

How often should the test be executed

Host

Host name of the server for which the test is to be configured.

PortNo

Enter the port to which the specified host listens.

ClientName

Specify the ID of the client system as what the eG agent will be connecting to the SAP ABAP instance. To know how to determine the client ID to use, follow the instructions provided in Determining the Client ID/Name for the eG Agent to Connect to the SAP ABAP Instance.

SAPUser

Typically, to connect to a SAP ABAP instance and run tests, the eG agent requires the permissions of a SAP user who has been assigned with certain authorization objects. Ideally, you will have to create a new user role on the SAP ABAP instance for this purpose, associate the above-mentioned authorization objects with that role, and assign the new role to an existing SAP user. The procedure for the same has been provided in Creating a New User Role for Monitoring and Assigning it to a SAP User. Once the new role is assigned to a SAP user, specify the name of this user against SAPUser.

Password

The password of the specified SAPUser.

Confirm Password

Confirm the password by retyping it here.

SysNo

An indicator of the TCP/IP port at which the SAP server listens. For example, for a server that listens at port 3200, the SysNo will be ‘00’. Similarly, if the SAP server port is 3201, the SysNo will have to be specified as ‘01’. Therefore, in the SysNo text box specify the system number of the SAP server with which the specified client communicates. To know the system number for the ABAP server being monitored, follow the procedure detailed in Identifying the SAP Router String and System Number.

Router

If the SAP client with the specified ClientName exists in a network external to the SAP server, then a router will be used to enable the server-client communication. In such a case, specify the router string of the router in the Router text box. If both the client and the server exist in the same network, then specify ‘none’ against the Router text box. To know what is the SAP Router string for the ABAP server being monitored, follow the procedure detailed in Identifying the SAP Router String and System Number.

InstanceName

This is set to none by default. This implies that the eG agent automatically discovers the instance name at run time. 

Timeout

Indicate the duration (in seconds) for which this test should wait for a response from the SAP ABAP instance. By default, this is set to 120 seconds.

JCO Version

The eG agent uses the SAP JCO library to connect to the SAP ABAP system and pull out metrics. To enable the eG agent to make this connection and query the metrics, you need to specify the version of the SAP JCO library that the agent needs to use. For instance, to instruct the eG agent to use JCO v2.1.19, it would suffice if you specify the ‘major version number’ alone against JCO Version – in the case of this example, this will be 2.x. Note that if you have downloaded the SAP JCO CONNECTOR files for SAP JCO version 3 from the SAP market place (as instructed by Downloading the SAP JCO Connector files Required for Monitoring ), then the JCO Version configuration should be 3.x. 

DD Frequency

Refers to the frequency with which detailed diagnosis measures are to be generated for this test. The default is 1:1. This indicates that, by default, detailed measures will be generated every time this test runs, and also every time the test detects a problem. You can modify this frequency, if you so desire. Also, if you intend to disable the detailed diagnosis capability for this test, you can do so by specifying none against DD Frequency. 

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Number of locks

Indicates the number of locks of this type currently held.

Number

A low value is desired for this measure. Compare the value of this measure across lock types to know which lock type contains the maximum number of locks. 

Percentage of locks

Indicates the percentage of total locks currently held that are of this type.

Percent

A low value is desired for both exclusive lock types. A high value indicates that a majority of the locks are exclusive locks, which is a cause for concern.

5 mins to 1 hour locks

Indicates the number of locks of this type that were held for a duration between 5 minutes to 1 hour.

Number

Normally, locks are automatically released when transactions are committed or when users finish working on the data. If locks remain unreleased for long time periods, it may not always be a cause for alarm, as it may be owing to something as routine as long-running background jobs that update the database. Some other times, unreleased locks can cause serious performance issues to the SAP system.

This is why, high values reported by any of these measures cannot be ignored. In such situations, it is best to immediately investigate the reason why locks were held for such a long duration. To know which precise locks were unreleased by which user and why, use the detailed diagnosis of this measure. 

Some of the most common reasons for unreleased locks are as follows:

  • Abnormal termination of the SAP GUI: If users shut down their PCs without logging off SAP, or if the SAP GUI terminates for other reasons, such as network or communication problems, the user session may remain active in the SAP system. If this happens while the user had lock entries, sometimes these locks remain unreleased since the user is no longer active in the system. In these cases, you can manually release the lock by deleting it from the lock entry list, or you can force log off the user from the User Overview Monitor in the application server where the user was logged on.
  • Inactive SAP GUI: When users currently working on the system leave their presentation services with unfinished transactions, locks will not be released. You can release such locks by deleting them from the lock entry list, but only after confirming that they are not coming from important background jobs.
  • Problems in update processing: When there are update modules that are unprocessed by the system, these modules do not release the locks. The update module releases the locks only when the update records have been completely processed or they have abnormally terminated with an error status. Only update modules with status INIT or AUTO can hold locks.

1 hour to 1 day locks

Indicates the number of locks of this type that were held for a duration between 1 hour to 1 day.

Number

Locks older than 1 day

Indicates the number of locks of this type that were held for over a day.

Number