Showing posts with label example. Show all posts
Showing posts with label example. Show all posts

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.

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.
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.

Friday, February 17, 2012

Connecting VIA IP Address

When I try to connect via IP to a newly created Active Active cluster I
have to add the port to the IP for it to work. An example is if my IP
is 10.0.0.1 and I try to connect it times out. if I try 10.0.0.1,1433
then it works fine. Am I missing a setting somewhere to make this work
just by using the IP? Oh... and just to note this work the same accross
the network or if I am logged on local to the box.
thanks
Chris
I should have stated this but I am using SQL Server 2000 and the server
is Windows 2003
|||I should have stated this but I am using SQL Server 200 on a Windows
2003 cluster

COnnecting via IP address

When I try to connect via IP to a newly created Active Active cluster I
have to add the port to the IP for it to work. An example is if my IP
is 10.0.0.1 and I try to connect it times out. if I try 10.0.0.1,1433
then it works fine. Am I missing a setting somewhere to make this work
just by using the IP? Oh... and just to note this work the same accross
the network or if I am logged on local to the box.
thanks
Chris
I should have stated this but I am using SQL Server 200 on a Windows
2003 cluster
|||Your SQL Server instance must be a named instance listening on port 1433. If
it were a default instance, connecting to the IP without specifying a port
would have automatically led to the default port of 1433, and would have
succeeded.
With a named instance, however, you are not directed to 1433 by default.
Either the client has to be told by the server via UDP 1434 as to what port
to use, or it has to identify the port explicitly. And if the client is
using an explicit IP address, you are not using UDP 1434.
Linchi
<cfrank@.investorforce.com> wrote in message
news:1140797262.929065.72080@.i40g2000cwc.googlegro ups.com...
> When I try to connect via IP to a newly created Active Active cluster I
> have to add the port to the IP for it to work. An example is if my IP
> is 10.0.0.1 and I try to connect it times out. if I try 10.0.0.1,1433
> then it works fine. Am I missing a setting somewhere to make this work
> just by using the IP? Oh... and just to note this work the same accross
> the network or if I am logged on local to the box.
> thanks
> Chris
>

COnnecting via IP address

When I try to connect via IP to a newly created Active Active cluster I
have to add the port to the IP for it to work. An example is if my IP
is 10.0.0.1 and I try to connect it times out. if I try 10.0.0.1,1433
then it works fine. Am I missing a setting somewhere to make this work
just by using the IP? Oh... and just to note this work the same accross
the network or if I am logged on local to the box.
thanks
ChrisI should have stated this but I am using SQL Server 200 on a Windows
2003 cluster|||Your SQL Server instance must be a named instance listening on port 1433. If
it were a default instance, connecting to the IP without specifying a port
would have automatically led to the default port of 1433, and would have
succeeded.
With a named instance, however, you are not directed to 1433 by default.
Either the client has to be told by the server via UDP 1434 as to what port
to use, or it has to identify the port explicitly. And if the client is
using an explicit IP address, you are not using UDP 1434.
Linchi
<cfrank@.investorforce.com> wrote in message
news:1140797262.929065.72080@.i40g2000cwc.googlegroups.com...
> When I try to connect via IP to a newly created Active Active cluster I
> have to add the port to the IP for it to work. An example is if my IP
> is 10.0.0.1 and I try to connect it times out. if I try 10.0.0.1,1433
> then it works fine. Am I missing a setting somewhere to make this work
> just by using the IP? Oh... and just to note this work the same accross
> the network or if I am logged on local to the box.
> thanks
> Chris
>