Print Thread
Keep sessions alive by tranparently executing a "select 1 from dual"?
#60788 12/03/19 09:45 AM
Joined: Jan 2010
Posts: 20
C
Member
OP Offline
Member
C
Joined: Jan 2010
Posts: 20
I frequently use pl/sql developer to connect to remote databases and often my customer's database/network administrator have put some rule in place for which inactive sessions get terminated.
I know there is already the "check connections" option, but this doesn't seem to be executed periodically (say once every minute): the connection is checked only when I interact with it. This means that every time I move to a sql window whose connection has been closed, I have to wait up to 30-40 seconds for the connection to be re-connected.

This wouldn't happen if pl/sql developer was keeping alive dormient connections by executing periodically a "select x from dual". Could you please add this feature, thanks.


By the way: the above problem gets very annoying when all you want to do is to close PL/SQL developer but you have say 10-20 sql windows open in its session and most of them have been disconnected. In this situation pl/sql developer will try to reconnect every session one at a time, just to ask you if you want to save what you were doing... and it takes 30-40 seconds for each window (because it does it sequentially: it does not try to reconnect them all all at once).

Actually, for me, it is almost impossible to close pl/sql developer in a clean way under these circumstances: I really have to brutally
terminate the process because I can't wait 10 minutes just to have pl/sql developer reconnect all its sessins before closing it...

(As a side note: it would be nice if all the dictionary lookup operations done while editing were done asynchronously by a background process, without having the user interface freeze until the dictionary queries are completed.)


Re: Keep sessions alive by tranparently executing a "select 1 from dual"?
Carlo Sirna #60791 12/03/19 10:12 AM
Joined: Aug 1999
Posts: 22,214
Member
Offline
Member
Joined: Aug 1999
Posts: 22,214
The "Check Connection" option will check a connection once per minute. It only checks this for the main database session of the connection though. It does not check this for all individual database sessions of all windows that are associated with this connection.

There is however an option to execute a keep-alive query for all sessions. Edit the Params.ini file in this installation directory and add the following line:

CheckAllSessions=1

Now, when you enable the "Check connection" option, all database sessions of all connections will be checked once per minute.


Marco Kalter
Allround Automations
Re: Keep sessions alive by tranparently executing a "select 1 from dual"?
Marco Kalter #60793 12/03/19 10:59 AM
Joined: Jan 2010
Posts: 20
C
Member
OP Offline
Member
C
Joined: Jan 2010
Posts: 20
Great!
Thank you!

Re: Keep sessions alive by tranparently executing a "select 1 from dual"?
Carlo Sirna #60818 12/10/19 09:04 PM
Joined: Dec 2002
Posts: 491
Wellington, NZ
Member
Offline
Member
Joined: Dec 2002
Posts: 491
Wellington, NZ
can this be turned into an option please?


... suck in your lips and frown like a werewolf ...
Re: Keep sessions alive by tranparently executing a "select 1 from dual"?
rbrooker #60819 12/11/19 08:04 AM
Joined: Mar 2007
Posts: 210
Rostock, Germany
Member
Offline
Member
Joined: Mar 2007
Posts: 210
Rostock, Germany
yup, cause we don't have access to installation directory


There is no shortcut for experience(d).

PL/SQL Developer Version 10+11+12, Query Reporter Version 3.2.0.300
Oracle 11g,12c
Windows Server 2003/2008
Windows 10 Professionel 64 bit



Re: Keep sessions alive by tranparently executing a "select 1 from dual"?
Theod #60820 12/11/19 10:00 AM
Joined: Aug 1999
Posts: 22,214
Member
Offline
Member
Joined: Aug 1999
Posts: 22,214
We'll add this to the preferences.

If you don't have access to the installation directory, you can add this parameter to the PL/SQL Developer shortcut. For example:

"C:\Program Files\PLSQL Developer 13\plsqldev.exe" CheckAllSessions

Last edited by Marco Kalter; 12/11/19 10:00 AM.

Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.031s Queries: 15 (0.007s) Memory: 2.5212 MB (Peak: 3.0395 MB) Data Comp: Off Server Time: 2024-05-10 09:02:06 UTC
Valid HTML 5 and Valid CSS