?
Solved

How to monitor Database locks and  sap locks ?

Posted on 2009-04-08
1
Medium Priority
?
9,140 Views
Last Modified: 2013-11-16
what is the difference between these two

and how to trouble shoot the locks ?
0
Comment
Question by:sidharth100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
mass2612 earned 1000 total points
ID: 24145777
Hi,

I'm prepared to try to explain this as best I can. SAP locks are managed by SAP itself also known as the SAP enqueue whilst Database locks are managed by your database lock handler.

Database locks are set by data changing SQL statements such as update, insert, delete, etc and held until the SQL statement commit is called and then the DB lock is released.

In a SAP transaction there can be multiple steps, after each step the SAP work process triggers a commit (or rollback if a rollback is executed it also releases all DB locks) therefore reducing the time that a DB lock is in place. Sometimes however this type of locking is not sufficient for a SAP system or trasnaction and therefore the SAP lock was designed.

A SAP lock is a logical lock that acts only within the SAP system. If the SAP locking system the SAP enqueue locks a table or row then it can still be changed by a SQL statement that executes directly on the database and not through the SAP enqueue convention.

Therefore if a transaction has many steps to it such as booking a holiday (first you need flights, then a hotel, then a car, etc if you can't get a flight you don't want the hotel or if you can't get a hotel you don't want a flight). If you follow this example in the SAP transaction each component i.e. flight, hotel, car is treated as a SAP LUW and locked via a SAP lock in the enqueue system and stored in special update tables. Once the entire transaction is complete the enqueue system sends a request to the update work process which then transfers the updates to the database system. Once the DB has been updated the enqueue then releases the SAP locks.

When a developer develops a report or program they should write the program so that locks are only created as late as possible to reduce database waits due to locking. Performance problems can occur if the lock is held too long or not released.

You can monitor Database locks via transaction DB01 and ST04.

You can monitor SAP locks (enqueue) via transaction SM12.

This is a big topic and for specifics you need to look in SAP notes or contact SAP directly most of the time or if the problem is in a new program or report talk to the developer.
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello All, In previous article we used Hortonworks sandbox to work with Hadoop. Now, lets think to create own single node Hadoop on Linux. Here we Install and Configure Apache Hadoop on UI based Oracle Linux. I assume, you have VMware installe…
Note: You must have administrative privileges in order to create/edit Sharing Rules. Salesforce.com (http://www.salesforce.com) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales an…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question