Home » SQL & PL/SQL » SQL & PL/SQL » DBMS_LOCK.sleep(5) giving error
DBMS_LOCK.sleep(5) giving error [message #187998] Wed, 16 August 2006 11:47 Go to next message
rajesh_uppada
Messages: 4
Registered: August 2006
Junior Member
Hi All,

I am going to use DBMS_LOCK.sleep(5) in my Procedure

ex :

Function TestReturn(I_num Number) return number
is
begin
DBMS_LOCK.sleep(5);
return I_num;
End TestReturn;

while compilation time i got following error

Error: PLS-00201: identifier 'SYS.DBMS_LOCK' must be declared
Line: 158
Text: DBMS_LOCK.sleep(5);


Note: I have 9.2 version in my system.

Thans Advance
Re: DBMS_LOCK.sleep(5) giving error [message #188003 is a reply to message #187998] Wed, 16 August 2006 12:25 Go to previous messageGo to next message
Yasir Hashmi
Messages: 304
Registered: April 2006
Senior Member
Create or replace function Function TestReturn(I_num Number) return number
is
begin
DBMS_LOCK.sleep(5);
return I_num;
End TestReturn;
/
Function created

It works fine in my system
Re: DBMS_LOCK.sleep(5) giving error [message #188021 is a reply to message #188003] Wed, 16 August 2006 15:43 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Connect as SYS and "GRANT EXECUTE ON DBMS_LOCK TO user"
Re: DBMS_LOCK.sleep(5) giving error [message #188029 is a reply to message #187998] Wed, 16 August 2006 16:57 Go to previous message
rajesh_uppada
Messages: 4
Registered: August 2006
Junior Member
Thanks
Previous Topic: select only duplicate values.............
Next Topic: how to find the sql statement and how long it is running
Goto Forum:
  


Current Time: Wed Dec 07 03:12:41 CST 2016

Total time taken to generate the page: 0.13072 seconds