0

I'd like to use squirrel-sqls keep-alive feature since my Oracle database connections get cut if they idle for too long. It's a self-explanatory feature - or so one would expect - and also covered on SO.

However, the obvious SELECT 1 FROM DUAL; does not cut it and results in this error:

2016-10-21 16:43:51,879 [Thread-4] INFO
    net.sourceforge.squirrel_sql.client.session.SessionConnectionKeepAlive
    - SessionConnectionKeepAlive (...) running SQL: SELECT 1 FROM DUAL;
2016-10-21 16:43:51,882 [Thread-4] ERROR 
    net.sourceforge.squirrel_sql.client.session.SessionConnectionKeepAlive 
    - run: unexpected exception while executing sql (SELECT 1 FROM DUAL;):
      ORA-00933: SQL command not properly ended
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
    (...)

What seems to be the problem here?

Community
  • 1
  • 1
zb226
  • 9,586
  • 6
  • 49
  • 79

1 Answers1

0

The problem is the trailing semicolon. Once removed...

SELECT 1 FROM DUAL

...the keep-alive feature starts working as expected.

zb226
  • 9,586
  • 6
  • 49
  • 79