Quantcast

Oracle Disconnect

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Oracle Disconnect

urbanmojo
I'm working with Squirrel 3.4.0 connecting to Oracle over a shaky VPN connection using the Oracle Thin JDBC driver.

I've noticed that even if Squirrel is sitting idle for some time and, during that time, I lose connection to the database and then come back and try to run a query that it doesn't run and I get something like a "closed connection error". (even though I currently do have connectivity when attempting to run it).

The only way I see is to close my query window and reconnect to the alias.

Question 1:
1. Is this an issue with Squirrel, the driver, or Oracle?
2. Any way around this?

Thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Oracle Disconnect

Drav Sloan
urbanmojo wrote:

> I'm working with Squirrel 3.4.0 connecting to Oracle over a shaky VPN
> connection using the Oracle Thin JDBC driver.
>
> I've noticed that even if Squirrel is sitting idle for some time and, during
> that time, I lose connection to the database and then come back and try to
> run a query that it doesn't run and I get something like a "closed
> connection error". (even though I currently do have connectivity when
> attempting to run it).
>
> The only way I see is to close my query window and reconnect to the alias.
>
> Question 1:
> 1. Is this an issue with Squirrel, the driver, or Oracle?

A thin driver connection is a tcp connection (and therefore stateful) which relies
on a permanent net connection. If this fails then the connection will drop.

> 2. Any way around this?

You can issue the "reconnect" command Session > Reconnect (quick shortcut of
Crtl-Alt-T), which will save you having to reopen the window. You may or may
have some success with a "keepalive" command. Right click on the Alias and
goto Alias Properties, select the connection tab, enable keep alive and set
some sql to run (select sysdate from dual as an example). However this may
make your connection drop more quickly.

Regards

D.

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Oracle Disconnect

John Hardin
On Sun, 26 May 2013, Drav Sloan wrote:

> urbanmojo wrote:
>> I'm working with Squirrel 3.4.0 connecting to Oracle over a shaky VPN
>> connection using the Oracle Thin JDBC driver.
>>
>> I've noticed that even if Squirrel is sitting idle for some time and, during
>> that time, I lose connection to the database and then come back and try to
>> run a query that it doesn't run and I get something like a "closed
>> connection error". (even though I currently do have connectivity when
>> attempting to run it).
>>
>> The only way I see is to close my query window and reconnect to the alias.
>>
>> Question 1:
>> 1. Is this an issue with Squirrel, the driver, or Oracle?
>
> A thin driver connection is a tcp connection (and therefore stateful) which relies
> on a permanent net connection. If this fails then the connection will drop.

One important piece of that is: if your IP address changes. If the VPN
connection drops, gets restored, and you get assigned the same IP address,
the TCP connection *should* recover unless the timeouts have been set
fairly short.

>> 2. Any way around this?
>
> You can issue the "reconnect" command Session > Reconnect (quick shortcut of
> Crtl-Alt-T), which will save you having to reopen the window. You may or may
> have some success with a "keepalive" command. Right click on the Alias and
> goto Alias Properties, select the connection tab, enable keep alive and set
> some sql to run (select sysdate from dual as an example). However this may
> make your connection drop more quickly.

--
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  [hidden email]    FALaholic #11174     pgpk -a [hidden email]
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   Maxim XXIX: The enemy of my enemy is my enemy's enemy. No more.
   No less.
-----------------------------------------------------------------------
  Tomorrow: Memorial Day - honor those who sacrificed for our liberty

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Loading...