Friday, February 24, 2012

Connection Broken

I have developed on application that connects to a sql database using tcp/ip
Sometimes the connection may get broken, for example with laptop users.
What is the most efficient way of detecting when this happens, instead of
the string of sql errors that we get.You either implement this through your own "sanity db class" with
sending a trivial command like "Select 'Sanity Check'" to SQL Server
and doing this in a try catch block, or you wrap the command you are
trying to send in a try catch block and retry upon the specific error
class for a lost connection.
Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Hello,
Mostly this should be because of some network issues. See if your network is
persistent..Run a ping from one of the laptop to sql server and redirect to
text file
and see if there is any request time-out..
Thanks
Hari
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.|||There are several Framework classes that can be called to see if the Network
changes state (which kills a connection) or you can use others to see if the
SQL Server instance is still responding. Yes, it sounds like there are
network hardware (or throughput/capacity) issues.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.

No comments:

Post a Comment