13

I am using PL/SQL Developer 11.0.4.1774. In my work, I need to use database whole day. Sometimes, during 30-60 minutes, I do not use ide and when I need to use it again, it requires reconnection.

I do not want to reconnect, is there any way to keep the connection alive whole day?

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
Mehmet Akif Güzey
  • 367
  • 1
  • 4
  • 15
  • The dba may have you in a resource consumer group that stops inactive sessions after X minutes. If you don't want to have to reconnect, keep working :) – thatjeffsmith Nov 20 '15 at 13:15

3 Answers3

13

Go to Tools --> Preferences and click "Check connection". It pings the database every 60 seconds, making the session active and avoids idle session disconnects caused by profiles.

enter image description here

NOTE: This question and answer are for Allround Automations PL/SQL Developer. See this question if you're looking for Oracle SQL Developer.

Jon Heller
  • 34,999
  • 6
  • 74
  • 132
  • I have the setting `OFF` and it's work ok. don't have the problem that OP reported... the settings is for `Check Connection. When this option is enabled, PL/SQL Developer checks every 60 seconds if your database connection is still alive. If your session is killed or the server is shutdown, PL/SQL Developer will automatically logoff. ` – are Nov 20 '15 at 13:53
  • 1
    @are That's because your profile is has IDLE_TIME set to UNLIMITED. Most likely the OP's DBAs set their IDLE_TIME to a finite value due to some security policy. This PL/SQL Developer feature is poorly named and described, but it will definitely keep the session active enough to evade the profile limit. – Jon Heller Nov 20 '15 at 14:46
  • Awesome - I missed that setting. Much better than my answer :) – William Robertson Nov 20 '15 at 17:02
  • This doesn't look at all like my 19.2.0.206 Tools - Preferences – Toolkit Nov 11 '19 at 07:05
  • 1
    @Toolkit You are probably using "Oracle SQL Developer", which is a different program than "PL/SQL Developer". – Jon Heller Nov 11 '19 at 21:12
  • @Toolkit what you're looking for is a little extension called "keepalive" which does the exact same thing in Oracle SQL developer - https://github.com/scristalli/sql-developer-keepalive – saran3h May 14 '20 at 10:12
  • Some tip on how to install above plugin. Donwload the jar file. https://github.com/scristalli/sql-developer-keepalive/releases Download the above jar and in your PL/SQL dveloper go to **HELP > CHECK FOR UPDATES > "INSTALL from Local Files"***..... Browse to jar and install it. – Reddymails Jul 14 '20 at 20:15
  • @Reddymails The names are very similar, but "SQL Developer" and "PL/SQL Developer" are two different products. I added a link to my answer for "SQL Developer" since this a common mistake. – Jon Heller Jul 14 '20 at 21:21
3

you need check 'IDLE_TIME' and 'CONNECT_TIME' setting for your user profile

select * from dba_profiles
  where resource_name in  ('IDLE_TIME','CONNECT_TIME')

http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_6010.htm

If a user exceeds the CONNECT_TIME or IDLE_TIME session resource limit, then the database rolls back the current transaction and ends the session. When the user process next issues a call, the database returns an error.

I have PL/SQL Developer opens for days and don't have the issue my PL/SQL Dev Tools-Prefernces-connection settings are:

  • Session Mode = Multy Session
  • Check connection = unchecked
  • Logoff with open transaction = Commit

and TIME settings are:

    PROFILE RESOURCE_NAME   RESOURCE_TYPE   LIMIT
1   DEFAULT IDLE_TIME   KERNEL  UNLIMITED
2   DEFAULT CONNECT_TIME    KERNEL  UNLIMITED
are
  • 2,535
  • 2
  • 22
  • 27
  • 1
    it's possible that the OP's DBAs have set things up so that connections are dropped after they've been idle for a certain period. I doubt that changing the above settings will affect how long the session is idle for. – Boneist Nov 20 '15 at 12:58
  • I have the same settings with you but as I said, I have problem. – Mehmet Akif Güzey Nov 20 '15 at 13:12
  • updated - check IDLE and CONNECT time settings for your profile – are Nov 20 '15 at 13:17
0
  1. Install the Reconnect plug-in so at least reconnecting can be a simple button-press.

  2. Possibly against the intention of the DBA (if the issue is due to profile/resource manager settings), but you might try setting a Sessions window (or other report/query etc) to auto-refresh every 25 minutes or so.

Edit: I see on the Bar Solutions website the developer has moved Reconnect from "Plugins" to "Old Plugins". At my current client site I can't install plugins, so I can't tell whether it still works at the moment.

William Robertson
  • 15,273
  • 4
  • 38
  • 44