Re: How to revalidate the connection (VB ADO) after database reboo



Thanks a lot Bob
I will try these in a sample application and will update you with the result
in the newgroup

But any how, thanks for taking time.
aali

"Bob Barrows [MVP]" wrote:

Well, someone has clearly steered you wrong about connection pooling. For
one thing, connections only stay available in the pool for 60 sec (default):
if they are not used, they close and are discarded. So it is impossible for
your application to get an "invalid" connection object.

Here is some reading material about pooling that you may find helpful:
http://msdn.microsoft.com/library/en-us/dnmdac/html/pooling2.asp
http://support.microsoft.com/?scid=kb;en-us;Q176056
http://support.microsoft.com/default.aspx?scid=kb;en-us;191572
http://support.microsoft.com/default.aspx?scid=kb;en-us;324686

So the idea, especially in a server application, is to open a connection, do
what is needed at the time, then close the connection so it is released back
to the pool.

Checking to see if a connection is "valid" is as simple as checking its
State property - no performance impact there. Anyways, connections are
opened and closed in the application code: there should be no need to reboot
a server to reestablish connections ...


aali wrote:
thanks Bob
The situation is in VB code we are doing connection pooling
implicitly, whenever database server reboot required then App servers
no longer able to serve the requests and we have to reboot the
server. One of the person who did a research told us that it is
because all the connections in the connection pool got invalid but
still application is getting the same invalid connection object. So
more specific question code be is there a way to always check that
the connection is valid and how much performance impact will this
check impose.
Or this theory is completely wrong and we are missing some basic
thing?
Any help or guide line will be really helpful.

Thanks for reading this post
aali

"Bob Barrows [MVP]" wrote:

aali wrote:
Hello All
I am trying to solve a scenario where, when database got rebooted we
do not have to reboot the application servers. In my case I have
oracle database running on its own physical box and application
server running VB code.
Is there a way we can avoid rebooting the app. server following
database reboot?

Frankly, I'm puzzled that you would think you need to reboot the app
server simply to re-establish database connections. Please explain
your reasoning.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



.



Relevant Pages

  • Re: ADO Connection Timeout
    ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Complicated Connection Problems bewteen ADP and SQL Server
    ... This database ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... might be in my ADO connection string. ...
    (microsoft.public.access.adp.sqlserver)
  • Complicated Connection Problem between ADP and SQL Server
    ... This database ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... might be in my ADO connection string. ...
    (microsoft.public.sqlserver.connect)
  • Re: ADO Connection Timeout
    ... so what happens when a connection failure forces one station to revert ... to a local database? ... Further, you *will* have contention issues, Jet does not support record ... to the central server, but you are willing to live with periods where it ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... When the first test is run, the results are stored in the central database. ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)