About Lock Entries and Lock Table Overflow

16
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2011 SAP AG 1 About Lock Entries and Lock Table Overflow Applies to: SAP NetWeaver BW 3.x. For more information, visit the EDW homepage. Summary This article explains about the error “Lock Table Overflow" encountered when the specified limit of Lock entries maintained with the Parameter enque/table_size which determines the size of the lock table in KB is Overflown.Articles briefs about the error “Lock Table Overflow” encountered when trying to collect large set of Objects to a Transport Request. Author: Rudra Pradeep Reddy Neelapu Company: Deloitte Consulting Created on: 1 January 2011 Author Bio Working as a BI Consultant with Deloitte Consulting India Pvt.Ltd., Skill set includes SAP Business Intelligence, ABAP and Business Objects.

Transcript of About Lock Entries and Lock Table Overflow

Page 1: About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 1

About Lock Entries and Lock

Table Overflow

Applies to:

SAP NetWeaver BW 3.x. For more information, visit the EDW homepage.

Summary

This article explains about the error “Lock Table Overflow" encountered when the specified limit of Lock entries maintained with the Parameter enque/table_size which determines the size of the lock table in KB is Overflown.Articles briefs about the error “Lock Table Overflow” encountered when trying to collect large set of Objects to a Transport Request.

Author: Rudra Pradeep Reddy Neelapu

Company: Deloitte Consulting

Created on: 1 January 2011

Author Bio

Working as a BI Consultant with Deloitte Consulting India Pvt.Ltd., Skill set includes SAP Business Intelligence, ABAP and Business Objects.

Page 2: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 2

Table of Contents

Introduction ......................................................................................................................................................... 3

Background Information ...................................................................................................................................... 3

Lock Concept .................................................................................................................................................. 3

Lock Table ....................................................................................................................................................... 3

Use….. ............................................................................................................................................................ 3

Subsequent Analysis of Lock Table Overflows .................................................................................................. 3

About Lock Table Overflow error ........................................................................................................................ 3

Maintaining the Profile Parameter ...................................................................................................................... 8

Reason and Prerequisites for Lock Table Overflow ......................................................................................... 10

Lock management ............................................................................................................................................ 10

Diagnosis ...................................................................................................................................................... 11

Diagnosis in update ....................................................................................................................................... 11

Statistics ........................................................................................................................................................ 13 Features ..................................................................................................................................................................... 13

Activities ............................................................................................................................................................ 14

Total Capacity Used ...................................................................................................................................... 14 Current ....................................................................................................................................................................... 14

History ........................................................................................................................................................................ 14

Delete History ............................................................................................................................................................ 14

Related Content ................................................................................................................................................ 15

Disclaimer and Liability Notice .......................................................................................................................... 16

Page 3: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 3

Introduction

The error “Lock Table Overflow” is encountered when the configured lock table limit is too small. Lock entries are maintained with the Parameter enque/table_size. Parameter enque/table_size determines the size of the lock table in KB.

This articles explains the scenario of “Lock Table Overflow” encountered when trying to collect large set of Objects to a Transport Request and steps taken to address the issue with the help of BASIS team.

Before going ahead let’s have brief information about Lock Entry and Lock Table concepts.

Background Information

Lock Concept

The Purpose of lock mechanism in the SAP system is to synchronize the access to data on the database. Lock mechanism prevents two transactions from changing the same data on the database simultaneously.

Lock Table

The lock entries in the system need to be recorded. For this a table in the main memory of the enqueue server records the current locks in the system. For each elementary lock, the table specifies the owner, lock mode, name, and the fields in the locked table.

Use

The lock table is used to manage locks. Every time the enqueue server receives a lock request, the system checks the lock table to determine whether the request collides with an existing lock. If this is the case, the request is rejected. Otherwise, the new lock is written to the lock table.

Subsequent Analysis of Lock Table Overflows

The maximum number of locks in the lock table is subject to an upper limit, which can be defined in a profile parameter. Parameter enque/table_size determines the size of the lock table in KB. You can determine both the maximum number and the current number of entries in the transaction using Extras/Statistics.

About Lock Table Overflow error

We faced the error “Lock Table Overflow” during the BI content activation and when trying to collect large set of Objects to a Transport Request. This error resulted because of Overflow of Lock entries, as the number of Lock entries has exceed the upper limit of maximum locks specified in the Lock Table.

Below are the error screen shots and suggestions from help for reference.

Screen shot of error resulted when collecting the Objects.

Page 4: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 4

On going with Diagnosis we can find that the error is because of Overflowed table when the System tried to enter SAP Locks in the Lock Table.

Below is the Log screen shot and we can find the Lock Management error in After Import Method.

Page 5: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 5

We found the maximum number of Lock Entries recorded using

SM12 -> Extras -> Statistics shows the statistics of the lock management, including the previous maximum fill levels (peak usage) of the partial tables in the lock table.

Page 6: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 6

From the Profile Parameter Attributes we can find the default values of Parameter enque/table_size.

Page 7: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 7

Page 8: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 8

Maintaining the Profile Parameter

From the below steps you can have an idea of how we can find the Default values of Parameters.(For this we required the authorization to necessary set of Tcodes and Authorization Objects).

The following table describes the main profile parameters associated with the lock mechanism. You can obtain a complete overview by searching for the parameters with the entry *enq* in transaction RZ11

Below is the screen shot of Enqueue Statistics with reflected limits allowing for more Lock Entries.

Page 9: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 9

On changing the parameter enque/table_size value with the help of BASIS we can increase the Lock Entries Limit.

From the above screen shot we can find the maximum number of Lock Entries as 9085 while the earlier limit was 3603.

Example: With the profile parameter "enque/table_size =32000”, the size of lock table is set to 32000 KB (32 MB). With this setting, the tables can contain around 40000 entries.

Note that the above sizes and numbers depend on various factors such as the kernel release, patch number, platform, address length (32/64-bit), and character width (Ascii/Unicode). Use the statistics display in SM12 to check the actual capacity of the lock table.

Page 10: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 10

Reason and Prerequisites for Lock Table Overflow

A lock table overflow can occur if:

Cause 1: The dimensions of the lock table are too small i.e. the lock table configured is too small. Cause 2: The update lags far behind or has shut down completely, so that the lock entries of the update requests that are not yet updated cause the lock table to overflow.

The update process is hanging and this is passing a lot of locks onto the update task.

Cause 3: The application programs are poorly designed. A lock is issued for each object in an application program, for example a collective run with many objects. And the application sets a large number of locks

Causes of malfunctions in lock management can be:

The enqueue server is not available

The message server is not available

Faulty computer connections

Incorrect system installation

Incorrect setting of system parameters

Lock management

Lock management contains a diagnosis function which can be used to determine the most important causes of malfunction.

We can analyze the type of lock that exists and about the lock owners who have contributed to the lock table overflow. To achieve this purpose a history function is provided.

Page 11: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 11

Diagnosis

To determine the cause: Call transaction SM12 and choose "Extras" -> "Diagnosis" (new) checks the effectiveness of the lock management

Diagnosis in update

Call transaction SM12 and choose "Extras" -> "Diagnosis in update" (new)

Below is the Screen Shot with Diagnosis in Update. Checks the effectiveness of the lock management in connection with updates

Page 12: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 12

Page 13: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 13

Statistics

SM12 -> Extras -> Statistics (new)

Shows the statistics of the lock management, including the previous maximum fill levels (peak usage) of the partial tables in the lock table.

If the owner table overflows, cause 2 generally applies. In the alert monitor (RZ20), an overrunning of the (customizable) high-water marks is detected and displayed as an alert reason.

If cause 2 applies, increasing the size of the lock table only delays the overflow of the lock table, but it cannot generally be avoided.

For cause 3, you should consider a tuning of the task function Instead of issuing a large number of individual locks, it may be better to use generic locks (wildcard) to block a complete subarea. This will also allow you to considerably improve the performance.

Features

The following information on the last 10 lock table overflows is saved:

The three lock owners with the most locks

The three lock arguments with the most locks

Page 14: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 14

Activities

Total Capacity Used

On the List of Lock Entries screen choose the menu option Extras Top Capacity Used

Current

The current capacity used status is displayed.

History

The overflow history is displayed. The person responsible, his or her user name, the time, and the number of locks are listed.

Delete History

The overflow history is deleted.

Page 15: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 15

Related Content

http://forums.sdn.sap.com/thread.jspa?threadID=38586

http://forums.sdn.sap.com/thread.jspa?threadID=1801992

http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/47/ea5e27e97f486ee10000000a42189d/content.htm

For more information, visit the EDW homepage

Page 16: About Lock Entries and Lock Table Overflow

About Lock Entries and Lock Table Overflow

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 16

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.