dbTalk Databases Forums  

preferred method to sleep()?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss preferred method to sleep()? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
DA Morgan
 
Posts: n/a

Default Re: preferred method to sleep()? - 11-12-2008 , 12:06 PM






Laurenz Albe wrote:
Quote:
mh (AT) pixar (DOT) com wrote:
I see four methods to sleep:

* dbms_backup_restore
* dbms_drs
* dbms_lock
* user_lock

Are any of them preferrable, deprecated, recommended, etc?

Just from looking at the Oracle 11.1 documentation, I would recommend
DBMS_LOCK.SLEEP, since DBMS_LOCK is the only package in your list
that is described in
http://download.oracle.com/docs/cd/B...b28419/toc.htm

The other ones are probably internal and not intended for public use,
with the drawback that they may change without notice in new releases.

Yours,
Laurenz Albe
The one created specifically for end-users and end-user apps is
USER_LOCK. It is not installed by default but requires the DBA
run $ORACLE_HOME/rdbms/admin/userlock.sql.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #12  
Old   
DA Morgan
 
Posts: n/a

Default Re: preferred method to sleep()? - 11-12-2008 , 12:06 PM






Laurenz Albe wrote:
Quote:
mh (AT) pixar (DOT) com wrote:
I see four methods to sleep:

* dbms_backup_restore
* dbms_drs
* dbms_lock
* user_lock

Are any of them preferrable, deprecated, recommended, etc?

Just from looking at the Oracle 11.1 documentation, I would recommend
DBMS_LOCK.SLEEP, since DBMS_LOCK is the only package in your list
that is described in
http://download.oracle.com/docs/cd/B...b28419/toc.htm

The other ones are probably internal and not intended for public use,
with the drawback that they may change without notice in new releases.

Yours,
Laurenz Albe
The one created specifically for end-users and end-user apps is
USER_LOCK. It is not installed by default but requires the DBA
run $ORACLE_HOME/rdbms/admin/userlock.sql.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #13  
Old   
DA Morgan
 
Posts: n/a

Default Re: preferred method to sleep()? - 11-12-2008 , 12:06 PM



Laurenz Albe wrote:
Quote:
mh (AT) pixar (DOT) com wrote:
I see four methods to sleep:

* dbms_backup_restore
* dbms_drs
* dbms_lock
* user_lock

Are any of them preferrable, deprecated, recommended, etc?

Just from looking at the Oracle 11.1 documentation, I would recommend
DBMS_LOCK.SLEEP, since DBMS_LOCK is the only package in your list
that is described in
http://download.oracle.com/docs/cd/B...b28419/toc.htm

The other ones are probably internal and not intended for public use,
with the drawback that they may change without notice in new releases.

Yours,
Laurenz Albe
The one created specifically for end-users and end-user apps is
USER_LOCK. It is not installed by default but requires the DBA
run $ORACLE_HOME/rdbms/admin/userlock.sql.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #14  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: preferred method to sleep()? - 11-13-2008 , 10:10 AM



Mark D Powell <Mark.Powell (AT) eds (DOT) com> wrote:
Quote:
I see four methods to sleep:

* ** dbms_backup_restore
* ** dbms_drs
* ** dbms_lock
* ** user_lock

Are any of them preferrable, deprecated, recommended, etc?

Just from looking at the Oracle 11.1 documentation, I would recommend
DBMS_LOCK.SLEEP, since DBMS_LOCK is the only package in your list
that is described inhttp://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/toc.htm

The other ones are probably internal and not intended for public use,
with the drawback that they may change without notice in new releases.

Yes, but dbms_lock.sleep has had a known error in its timing since it
was introduced and also apparently for versions 8iR2 (8.1.6) through
11gR1(11.1.0.6) has a bug which can cause a serious error in the time
slept for long sleep times.

If you have support the following note may be of interest

Instead of DBMS_LOCK.SLEEP Procedure Use SYS.DBMS_BACKUP_RESTORE.SLEEP
For Time Interval > 3600
document #471246.1

For short sleeps where the timing does not have to be exact
dbms_lock.sleep works OK.
Thanks for the clarification, I did not look on Metalink.

Yours,
Laurenz Albe


Reply With Quote
  #15  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: preferred method to sleep()? - 11-13-2008 , 10:10 AM



Mark D Powell <Mark.Powell (AT) eds (DOT) com> wrote:
Quote:
I see four methods to sleep:

* ** dbms_backup_restore
* ** dbms_drs
* ** dbms_lock
* ** user_lock

Are any of them preferrable, deprecated, recommended, etc?

Just from looking at the Oracle 11.1 documentation, I would recommend
DBMS_LOCK.SLEEP, since DBMS_LOCK is the only package in your list
that is described inhttp://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/toc.htm

The other ones are probably internal and not intended for public use,
with the drawback that they may change without notice in new releases.

Yes, but dbms_lock.sleep has had a known error in its timing since it
was introduced and also apparently for versions 8iR2 (8.1.6) through
11gR1(11.1.0.6) has a bug which can cause a serious error in the time
slept for long sleep times.

If you have support the following note may be of interest

Instead of DBMS_LOCK.SLEEP Procedure Use SYS.DBMS_BACKUP_RESTORE.SLEEP
For Time Interval > 3600
document #471246.1

For short sleeps where the timing does not have to be exact
dbms_lock.sleep works OK.
Thanks for the clarification, I did not look on Metalink.

Yours,
Laurenz Albe


Reply With Quote
  #16  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: preferred method to sleep()? - 11-13-2008 , 10:10 AM



Mark D Powell <Mark.Powell (AT) eds (DOT) com> wrote:
Quote:
I see four methods to sleep:

* ** dbms_backup_restore
* ** dbms_drs
* ** dbms_lock
* ** user_lock

Are any of them preferrable, deprecated, recommended, etc?

Just from looking at the Oracle 11.1 documentation, I would recommend
DBMS_LOCK.SLEEP, since DBMS_LOCK is the only package in your list
that is described inhttp://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/toc.htm

The other ones are probably internal and not intended for public use,
with the drawback that they may change without notice in new releases.

Yes, but dbms_lock.sleep has had a known error in its timing since it
was introduced and also apparently for versions 8iR2 (8.1.6) through
11gR1(11.1.0.6) has a bug which can cause a serious error in the time
slept for long sleep times.

If you have support the following note may be of interest

Instead of DBMS_LOCK.SLEEP Procedure Use SYS.DBMS_BACKUP_RESTORE.SLEEP
For Time Interval > 3600
document #471246.1

For short sleeps where the timing does not have to be exact
dbms_lock.sleep works OK.
Thanks for the clarification, I did not look on Metalink.

Yours,
Laurenz Albe


Reply With Quote
  #17  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: preferred method to sleep()? - 11-13-2008 , 10:10 AM



Mark D Powell <Mark.Powell (AT) eds (DOT) com> wrote:
Quote:
I see four methods to sleep:

* ** dbms_backup_restore
* ** dbms_drs
* ** dbms_lock
* ** user_lock

Are any of them preferrable, deprecated, recommended, etc?

Just from looking at the Oracle 11.1 documentation, I would recommend
DBMS_LOCK.SLEEP, since DBMS_LOCK is the only package in your list
that is described inhttp://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/toc.htm

The other ones are probably internal and not intended for public use,
with the drawback that they may change without notice in new releases.

Yes, but dbms_lock.sleep has had a known error in its timing since it
was introduced and also apparently for versions 8iR2 (8.1.6) through
11gR1(11.1.0.6) has a bug which can cause a serious error in the time
slept for long sleep times.

If you have support the following note may be of interest

Instead of DBMS_LOCK.SLEEP Procedure Use SYS.DBMS_BACKUP_RESTORE.SLEEP
For Time Interval > 3600
document #471246.1

For short sleeps where the timing does not have to be exact
dbms_lock.sleep works OK.
Thanks for the clarification, I did not look on Metalink.

Yours,
Laurenz Albe


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.