How is dbms_lock used?

book

Article ID: 160377

calendar_today

Updated On:

Products

Data Loss Prevention Enforce

Issue/Introduction

Within Oracle, what is dbms_lock and why should the Symantec DLP schema be granted EXECUTE on it?

Resolution

dbms_lock is leveraged for dbms_lock.sleep( ), an Oracle PLSQL utility that can be used to manage execution time for a procedure or function. By specifying the number of seconds (i.e., dbms_lock.sleep(15)), the process becomes inactive, without terminating, for that amount of time.  It has been used in the past for the diagnosis of connectivity issues, where a connection is established to the database, the session put to “sleep” for a period of time, after which is “wakes up” and completes.

 

 

(SEE related KB: TECH219372: How to check for connection persistence using SQLPlus)