Note 678501:System stoppage, locks on table NRIV
db01-database level locks
sm12-sap level locks
if want clear answer for see below details
DB01/ST04 locks/lock waits appear when a resource is held by a user/process exclusively and another process is trying to access it. This is not a problem as long as the locks are not permanent.
SM12 : Shows all the locks DB and SAP level .It canbe either shared or exclusive locks in the system.
It is a good practise to remove the old locks, with the confirmation from the user who has held it.
DB01: Shows Exclusive HOLDs and Exclusive WAITs situations.
HOLD & WAIT situation occure when a resource is held by a user/process exclusively which is called a HOLD,
and another process is trying to access it and goes to a WAIT situation.
We need to take care when locks are holding for a long time,and when it leads to a deadlock situation.