Hi, I was wondering if there was an option to keep an Oracle database connection alive. I like to keep an editor window open most of the day and it would be most useful if I wouldn’t have to reconnect each time.
An option like this should be unnecessary. The application should check the connection to see that it is open before every exectution. If it is not we are to reconnnect.
Have you run into a situation where this is not happening? If so, please tell us what type of connection you are using and what you have run into. A screenshot of any messages would be helpful.
What you say does seem to be right. Here’s my concern and what I am seeing:
Let’s say I open an editor and execute a script (say, select sysdate from dual, for example). I then leave Toad open and don’t do anything to explicitly disconnect from the server. After a few minutes I see a popup sating that the connection was lost and the last command is being re-executed. However, I don’t see the last command being re-executed. The same date/time is still there. So what we re-executed? I also enabled the option to automatically remember the option to re-execute the last command, but I don’t see where to re-enable it.
My concern is that I can only have ten concurrent sessions on my server. If I am being disconnected in any way, I want to be sure that I have gracefully disconnected from the server and that my session is actually killed too. Is this procedure above (to automatically reconnect) safe enough to ensure that I am correctly disconnecting from the server and that I am not keeping erroneous sessions open on the server? In other words, am I disconnecting, killing the session on the server and then reconnecting in a new session? Thus keeping the net total of just one session?
Sorry for the long newbie question but I am coming from the Oracle free SQL developer and I had a lot of problems with my DBAs because they said I was keeping too many open sessions on the server (I guess SQL Developer wouldn’t always correctly disconnect from the server). I just want to make sure that problem goes away when I use Toad and will be able to keep the DBAs off my back.
First of all make sure you are connecting to Oracle using an OCI client and not Direct Connect or ODBC. The client is much more dilegent on cleaning up sessions. The fact you are seeing the message that you are makes me think you are using ODBC or Direct Connect. Please install an instant or full client. If using instant client see the help files for details.
Secondly, go to Tools | Options | Database General and turn on Extended Connection pooling hints. Once this is on you can hover over your connection and the hint will tell you how many connections are open for the application.
You should have no problem with connections. When connections are no longer used they are disposed of properly.
I forgot to say that the Advanced tab simply shows ODBD Driver:
You are using an OCI Client that was installed with the local instance of Oracle on your pc. That will work just fine.
Let me know your experience with watching the connections in the hint list.
Sounds good. Thanks, Debbie.