PL/SQL on SquirreL SQL Client 3.7.1

2019-06-26 16:45发布

I was trying to execute PL/SQL scripts on SQuirrel but it doesn't seem to work.

I configured Oracle Thin Driver by adding ojdbc7.jar on "Extra Class Path", was able to connect to the database but when tried to run a simple code it gives an error:

-- code
BEGIN
  dbms_output.put_line('Hello World');
END;
/

-- error
Error: ORA-06550: line 2, column 37:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

:= . ( % ;

SQLState:  65000
ErrorCode: 6550
Error occurred in:
BEGIN
  dbms_output.put_line('Hello World')

Am I doing anything wrong?

4条回答
劫难
2楼-- · 2019-06-26 17:19

When installing the SQuirreL, try including the Oracle Plugin. This works for me in version 3.8.1.

查看更多
放我归山
3楼-- · 2019-06-26 17:22

can you try this:

BEGIN
  dbms_output.put_line('Hello World');
END;

by removing /

查看更多
何必那么认真
4楼-- · 2019-06-26 17:26

This statement worked for me (the / is necessary for SQuirrel SQL Client):

BEGIN
    dbms_output.put_line('Hello World');
END;
/

However, you won't see the output in the usual Results tab. You need to open the Oracle Database Output window. As far as I can see you can only open it with a button on the toolbar. You'll also need to enable auto refresh or manually refresh the output.

enter image description here

查看更多
Luminary・发光体
5楼-- · 2019-06-26 17:31

Oracle plugin for Squirrel is needed for executing queries in BEGIN - END; Had the same problem untill reinstalled squirrel with Oracle plugin.

查看更多
登录 后发表回答