Oracle dbms_lock.sleep() cannot be called

212 views
Skip to first unread message

Martin Landvoigt

unread,
Mar 24, 2017, 12:18:07 PM3/24/17
to dbfit
I tried somthing like 

!| Execute Procedure | dbms_lock.sleep(1) |
--> java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00801: internal error [22503]
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

!| Execute  | Execute dbms_lock.sleep(1) |
--> java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement


!| Execute | begin dbms_lock.sleep( 1 ); end |
--> java.sql.SQLException: ORA-06550: line 1, column 31:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

   ;  
The symbol ";" was substituted for "end-of-file" to continue.
--------------------------

None worked with dbFit,  but with TOAD  ... any ideas?

Yavor Nikolov

unread,
Mar 24, 2017, 1:26:51 PM3/24/17
to dbfit
!| Execute Procedure | dbms_lock.sleep(1) |
 
Arguments to stored procedures are passed at separate lines (not on 1st one):
!|Execute Procedure|dbms_lock.sleep|
|seconds|
|1|

!| Execute  | Execute dbms_lock.sleep(1) |
"Execute dbms_lock.sleep(1)" is not a valid SQL block ("execute" is specific to SQL*Plus and maybe other tools).


!| Execute | begin dbms_lock.sleep( 1 ); end |
Not a valid Oracle PL/SQL block either - you're missing ; at the end. It shall be:

!|Execute|begin dbms_lock.sleep(1); end|


--
You received this message because you are subscribed to the Google Groups "dbfit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+unsubscribe@googlegroups.com.
To post to this group, send email to db...@googlegroups.com.
Visit this group at https://groups.google.com/group/dbfit.
For more options, visit https://groups.google.com/d/optout.

Martin Landvoigt

unread,
Mar 28, 2017, 12:05:19 PM3/28/17
to dbfit
Thnx a lot :-)
Reply all
Reply to author
Forward
0 new messages