8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Misc » Here

Comments for DBMS_SESSION.SLEEP Replaces DBMS_LOCK.SLEEP in Oracle Database 18c


Patrick Jolliffe said...

Tim,
I know I'm holding you to a very high standard here, but your examples really should be following best practice and fully qualify packages such as dbms_output and dbms_session.
I don't always do this myself, but I try, and it always sticks out to me in your examples when you don't.
Of course this is general point, nothing specific to this page.
Thanks for all your hard work!
Patrick

Tim... said...

Hi.

Yeah. There is no defensive code in any of the examples. I don't check parameter values or use DBMS_ASSERT or anything like that either, as I would in real code. If I'm honest I just think the "SYS." thing looks ugly, but you are correct. I shall make it a background task to go through stuff and do some rework, starting with this article. :)

Cheers

Tim...

Patrick Jolliffe said...

Do you mean sys.dbms_assert? :)
You've got such a wealth of content I wouldn't even dream of doing such a task manually. Could you automate it somehow?
I've kind of got used to it in my code, so to me the unqualified version sticks out, but yes I do take your point.
Patrick

Tim... said...

Hi.

I could pretty much do a search and replace in the database really easily, but there are things like titles and keywords that would get knackered. Better to do a manual scan. The big question is do I use "sys." or "SYS.". Not sure which I prefer stylistically. I'm struggling to switch to all lower case because old habits die hard. :)

Cheers

Tim...

Paul said...

It seems there is a difference between dbms_session.sleep and dbms_lock.sleep, the first one imposes a limit on the sleeptime of one hour and "ORA-38148: invalid time limit specified" will be raised if you specify a value > 3600.



Tim... said...

Hi.

I added it in the article and mentioned you. :) Thanks for the heads-up.

Cheers

Tim...

DO NOT ask technical questions here! They will be deleted!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!

If you post personal information (name, email address etc.) you are agreeing to them being stored and displayed. Feel free to remain anonymous.