Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: No PL/SQL Timer Function
Pls check dbms_lock.sleep
Thanks
Vidya
From: "Steve Orr" <sorr_at_arzoo.com>
Reply-To: <steve_at_arzoo.com>
To: "Oracle-L" <oracle-l_at_fatcity.com>, "Oracledba"
<oracledba_at_QuickDoc.co.uk>
Subject: No PL/SQL Timer Function
Date: Tue, 18 Jul 2000 09:00:53 -0700
I can't find a timer function in PL/SQL. Without a major development effort I'd like to QUICKLY write a monitoring script which executes a query at a given interval over a certain period of time. Here's a hypothetical example... a query against the v$session and v$access tables every 15 seconds for the next 60 minutes. I need something like a UNIX shell "sleep 15" but I want the timer looping to be from a persistent connection so there's no connect/disconnect from the database every few seconds. I guess I could get a modulus of the results from DBMS_UTILITY.GET_TIME to develop my own timer function. Has anyone done something like this in PL/SQL? Any ideas? Please? Pretty please?
TIA,
Steve Orr