scristalli / sql-developer-keepalive

MIT License
149 stars 21 forks source link

Make keepalive query editable per connection #16

Closed EmteZogaf closed 4 years ago

EmteZogaf commented 8 years ago

I use sqldeveloper for other databases than oracle, e.q. PostgreSQL, which throws an error on query "SELECT SYSDATE FROM DUAL;".

A configurable query for each connection which defaults to "SELECT SYSDATE FROM DUAL;" would solve the issue.

scristalli commented 8 years ago

This makes sense, actually it would be great to have keepalive running only on certain connections, with every parameter configurable (keepalive frequency, keepalive query). I do not have time now to put into the development of this feature, I will probably be able to release it in May (if someone wants to do it before, I'll be happy to merge).

bertbert72 commented 4 years ago

Not sure if this is still an active project or not. I've made a small change in my own fork to determine if the database is Oracle. If so it does the current query. If not it runs "select 1" instead which should work on most others. I use it with MS SQL Server and Oracle.

scristalli commented 4 years ago

@bertbert72 I still maintain the project, although no development has been done for a long time. Feel free to make a pull request if you want to share your change. Thank you.

bertbert72 commented 4 years ago

@scristalli I've created a pull request for the changes. I've had it running against Oracle, SQL Server and Postgres and it has been working fine.

scristalli commented 4 years ago

Merged #27. In case more compatibility is needed in the future, we can start from the changes made in the PR.