Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms lock must be declared

717865Mar 25 2010 — edited Mar 25 2010
Hi,
i have created one procedure called ex_load_pr. In that procedure, i am using DBMS_LOCK.sleep(20);. while compiling the procedure, i got the below error.

"PLS-00201: identifier 'DBMS_LOCK' must be declared".

i have tried the below anonymous block in my dev environment, and its working fine.

begin
dbms_lock.sleep(20);
dbms_output_put_line('test for lock');
end;

i ran the above query and i got the dbms output after 10 sec. after that i analysis with synonyms. this dbms_lock is a public synonym in my user account.

so, i can use the DBMS_LOCK in anonymous block. But I am not able to use this inside the procedure or packages.

Please suggest on this. how can resolve this issue.

Thanks,
chelladurai.

Edited by: chelladurai on Mar 25, 2010 4:06 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 22 2010
Added on Mar 25 2010
12 comments
49,017 views