Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to 'wait' in SQL plus

Re: how to 'wait' in SQL plus

From: Prem K Mehrotra <premmehrotra_at_hotmail.com>
Date: 12 Aug 2004 18:45:47 -0700
Message-ID: <43441e77.0408121745.584b60c0@posting.google.com>


yong321_at_yahoo.com (Yong Huang) wrote in message news:<b3cb12d6.0408121100.26cab210_at_posting.google.com>...
> "zeb" <spam_at_nowhere.com> wrote in message news:<411a6933$0$26984$626a14ce_at_news.free.fr>...
> > > What's the Oracle SQLPlus command to 'wait' for a particular period of
> > > time (e.g. 10 seconds) before the next statement/command run?
> >
> > see dbms_lock.sleep
> > HTH
>
> Just for the record. (Credit to Jonathan Lewis) dbms_lock.sleep has a
> small error in case you need it to be accurate. When you
> dbms_lock.sleep(1000), it really sleeps 1024 seconds (if I remember
> right). I just did a test on my 9.0.1 database running on Windows
> 2000, sleep(100) took 104 seconds. But my measurement is not very
> scientific.
>
> Also, if you use 8i, read Metalink Note:187528.1 for errors when sleep
> time exceeds 4164 seconds.
>
> Yong Huang

You could also use OS command inside sql*plus, e.g., on UNIX:

sqlplus user/passwd
select * from tab1;
host sleep 60
select * from tab2
quit

will sleep for 60 secodns between first and second select

Prem Received on Thu Aug 12 2004 - 20:45:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US