We need sleep function many a times in our code, may be for application logic or even sometimes for monitoring purpose. We always had this available with sleep() function that resides within DBMS_LOCK ==> DBMS_LOCK.SLEEP

This was always a big security risk as granting access to DBMS_LOCK will make a way to get access to other functions/procedures within which is not always necessary.

So from 18C, Oracle comes with SLEEP function within a publicly granted package ==> DBMS_SESSION.SLEEP.

DBMS_SESSION.SLEEP

From 18C DBMS_LOCK.SLEEP is deprecated, but it is still present for backwards compatibility.

I would suggest, whoever is planning to upgrade their databases to 19C in near future, should upgrade their PL/SQL codes to use DBMS_SESSION.SLEEP instead of DBMS_LOCK.SLEEP. Also one should make sure to revoke any grants to the DBMS_LOCK package where they were intended to give access to only SLEEP procedure.

References:

ER 23557076 : PUBLIC SLEEP FUNCTION

Hope u will find this post very useful. 🙂

Cheers

Regards,

Adityanath

 

Advertisements

13 responses to “DBMS_LOCK.SLEEP is now deprecated, the new SLEEP is DBMS_SESSION.SLEEP”

  1. ปั้มไลค์ Avatar
    ปั้มไลค์

    Like!! I blog quite often and I genuinely thank you for your information. The article has truly peaked my interest.

  2. ทิชชู่เปียกแอลกอฮอล์ Avatar
    ทิชชู่เปียกแอลกอฮอล์

    I really like and appreciate your blog post.

  3. กรองหน้ากากอนามัย Avatar
    กรองหน้ากากอนามัย

    I really like and appreciate your blog post.

  4. SMS Avatar
    SMS

    I used to be able to find good info from your blog posts.

  5. RyanPBuzzi Avatar
    RyanPBuzzi

    Hello! Someone inside my Myspace group shared this site around so I
    came to look it over. I’m definitely enjoying the details.
    I’m book-marking and are tweeting this to my
    followers! Outstanding blog and outstanding design.

  6. Stefan Drapkin Avatar
    Stefan Drapkin

    I like this post, enjoyed this one thankyou for putting up.

  7. Riva Trbovich Avatar
    Riva Trbovich

    I love looking through an article that will make people think. Also, many thanks for allowing for me to comment!

  8.  Avatar
    Anonymous

    Keep this going please, great job!

  9.  Avatar
    Anonymous

    Great post. I am going to be experiencing a few of these issues
    too..

  10.  Avatar
    Anonymous

    Wonderful site. Lots of helpful information here.

    I am sending it to several buddies ans additionally sharing in delicious.
    And of course, thank you for your sweat!

  11. Chauncey Durol Avatar
    Chauncey Durol

    Thanks for your personal marvelous posting! I really enjoyed reading it, you are a great author.I will be sure to bookmark your blog and will often come back in the foreseeable future. I want to encourage you to ultimately continue your great posts, have a nice day!

  12. Jacinto Avatar
    Jacinto

    Hello, I enjoy reading through your article. I wanted to write a little comment to
    support you.

  13. tìm hiểu trại chó poodle Avatar
    tìm hiểu trại chó poodle

    This design is spectacular! You definitely know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Fantastic job. I really loved what you had to say, and more than that, how you presented it. Too cool!

Leave a reply to Stefan Drapkin Cancel reply

Advertisements
Blog Stats

562,694 hits

Advertisements
Advertisements