Enqueue log analyzer – the best way to analyze SAP enqueue log
What is enqueue log
The SAP enqueue log (a.k.a. ENQLOG) is a log file of SAP enqueue operations (enqueue, dequeue, dequeue all, etc.), it is mainly used to record the SAP application enqueue activities of SAP NetWeaver Application Server systems. It is particularly suitable for the examination of conflict situations (enqueue rejects) where several programs are competing for the same lock.
The log file name is like ENQLOG<NNN>[.DAT]:
For classic enqueue server, NNN is the number of the relevant work process. (Each process writes an enqueue log)
For standalone enqueue server (a.k.a. ENSA), system only creates one enqueue log file, and NNN is always 99 (i.e. ENQLOG99).
How to get enqueue log
To get an enqueue log you’ll need to manually switch on/off in the ABAP system as it may impact the system performance. The log file will be created in the work directory of enqueue server. You can capture enqueue log either via SAPGUI or operation system level:
A) Generate enqueue log via SAPGUI
- Use transaction SM12, enter “test” in command field and run it by pressing Enter key, then a new menu “Error Handling” will show up, like the following picture.
- Go to “Error Handling” -> Logging -> Switch on.
- Wait for short time (e.g. 5 – 10 seconds).
- Go to “Error Handling” -> Logging -> Switch off.
- You can check “Error Handling” -> “Logging” -> “Display” to see whether something is recorded in the enqueue log file.
B) Generate enqueue log via command
- In case nothing is generated (e.g. system is not able to respond to the SM12 request), please try the command tool enqt to get enqueue log.
- Enqt (.ext) is part of the standard delivery, please go to the server in which the enqueue server is running
- Run enqt with “enqt (.exe) pf=<profile of the enqueue server > 81 1” to activate ENQLOG
- Wait for a few seconds (e.g. 5 – 10 seconds)
- Run the enqt with “enqt(.exe) pf=<profile of the enqueue server> 81 0” to deactivate ENQLOG
Then you can copy the enqueue log from the work directory of hard disk, the default location is:
For ASCS: /usr/sap/<SID>/<ASCS server name>/work/ENQLOG99
For non-ASCS: /usr/sap/<SID>/<enqueue instance name>/work/ENQLOG<NNN>
In recent versions, you can download the ENQLOG from transaction SM12 directly, please see SAP Note 2718799 ( ENQU: download traces in SM12). To get more information about getting enqueue log, please check SAP Note 2126913 (ENQU: The enqueue log).
Analyzing enqueue log with enqueue log analyzer
The enqueue log analyzer is a standalone lightweight Java tool used to analyze the enqueue logs. It provides answers to common SAP enqueue problems and highly simplifies the root cause analysis for SAP enqueue problems.
You can download the enqueue Log Analyzer tool (EnqueueLogAnalyzer.jar) and run it locally. Please make sure the JRE (Java Runtime Environment) is installed correctly and .jar file is executable in your computer before running the tool.
You can download the tool and introduction slides from the following link:
Download enqueue log analyzer
(The sha256 checksum of enqueue_log_analyzer.zip is: 2edac927d20ead33727400bd7fedfb657215ae03d039d32f10cec6e7c7e01cb4)
The main window of enqueue log analyzer is shown as following picture. You can use “Load ENQLOG” button or drag and drop feature to load an ENQLOG file or zipped ENQLOG file. All enqueue log entries will be listed after the input, including their log enable/disable time, enqueue requests number, request rejects number, etc. (Before loading any file, you can check the “Deep Analysis” option to enable the lock period analysis for the NEXT ENQLOG input)
Then if you double click on one log entry, or select one row and click “Analyze” button, you will see a detailed analysis window for your selected log.
There are some tabs shown in the top of detailed analysis window, you can use those tabs to check the enqueue requests overview, lock objects, lock users, rejects details, etc. for the selected log. Following pictures are the example of different analysis tabs.
All interesting information regarding your selected enqueue log section will be summarized in the “Analysis Summary” tab as a analysis summary. You can also double click on the table of lock objects/users/rejects/operations tab to check the detailed enqueue requests/enqueue rejects for particular enqueue lock object/user.
The “Lock Period Analysis” tab will be only displayed if you enable the “Deep Analysis” mode, it will show all the enqueue life cycle information when the log is captured, including their lock/unlock time, reject during the life cycle, etc. The example is shown below.
PS: <open> means the lock time/unlock time for this enqueue lock is/are not included in this ENQLOG, so the exact lock duration time cannot be calculated (but it’s longer than enqueue log duration anyway).
You can also refer to the SAP Knowledge Base Article 2763999 (How to analyze enqueue log with enqueue log analyzer).
Feedback & Support
Please contact the following project owner if you have any questions or ideas:
In case you want to report a bug, please provide your enqueue log file(s) and reproduce steps to the author.