Solved

How to Check & Validate ans Ms SQL 2000/2005 connection

Posted on 2011-02-23
13
271 Views
Last Modified: 2012-05-11
We have found that our apps gets disconnected random.  

How can I check the continuity with an SQL connection?  
0
Comment
Question by:rayluvs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
13 Comments
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 84 total points
ID: 34963059

That is a function of your application. Add code to your application to verify the connection
0
 

Author Comment

by:rayluvs
ID: 34963276
The application are various and are not developed by us.

Is there a CMD command like PING or another command that can verify this?
0
 
LVL 34

Assisted Solution

by:ste5an
ste5an earned 416 total points
ID: 34968587
As ewangoya wrote, a connection or session is application specific, so only the application can determine if the connection or session is still valid. This question has the same quality as "Is this computer connected to the internet?"

You can use SQLCMD

http://msdn.microsoft.com/en-us/library/ms180944.aspx

to check whether you can establish a conection. But this information is pretty worthless, after a disconnect/reconnect happened.  The only thing you can do, is to measure network stability in general.

btw, the connection is not made over any kind of WLAN/WiFi technology?

mfG
--> stefan <--
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:rayluvs
ID: 34969786
The connections is wired.

By what you are stating, that means that is not possible for SQL to loose connection if there is valid LAN connection?

There is no way to test an SQL connection continuously like    "PING XXX.XXX.XXX -t"

We have left running  "PING XXX.XXX.XXX -t" on the PCs to see if its LAN and the apps randomly hangs giving errors like tables not found, etc. even though the LAN is ok and the PING is giving correct connection results.
0
 
LVL 34

Assisted Solution

by:ste5an
ste5an earned 416 total points
ID: 34970222
Basically speaking, yes. Replace valid with stable, then yes. As TCP/IP can handle the normal problems on the wire.

The PING results cannot measure the quality of your connection, especially as ICMP is a different protocol. So this a pretty worthless information as it only states the you can make IPv4/IPv6 connection to the host.
0
 

Author Comment

by:rayluvs
ID: 34970485
Understood.  So how can I chack or validate an SQL connection?
0
 
LVL 34

Assisted Solution

by:ste5an
ste5an earned 416 total points
ID: 34970783
Form the client side: you can't. Form the server side, you can use e.g.
EXEC sp_who

Open in new window

and a lot of the System views in

http://msdn.microsoft.com/en-us/library/ms188068.aspx
0
 

Author Comment

by:rayluvs
ID: 34970870
But thats a Query Analyzer statement and the clients don't have SQL installed, they only have an ODBC connection.

I need to verify the communication between clients and SQL server.

There has to be a tool for this
0
 
LVL 34

Assisted Solution

by:ste5an
ste5an earned 416 total points
ID: 34971260
I like to repeat myself: It is not possible, when not done by the application itself.
0
 

Author Comment

by:rayluvs
ID: 34971442
Please excuse my ignorance in the topic, but I understand now: there is no way via a tool or command prompt to verify the communication between clients and SQL server.

Now by your comment, when done by the application itself, there is a way to verify the communication between clients and SQL server?  By that I understand that we can program an application to  verify the communication between clients and SQL server?

0
 
LVL 34

Assisted Solution

by:ste5an
ste5an earned 416 total points
ID: 34971645
This has nothing to with ignorance. You can only tell if a connection is working if you can inspect all involved components at once. This is under most circumstances not possible, thus you cannot determine whether a connection is working or not.

The only thing which can be done, can be done only by you application which fails randomly. This application can send a nonsense select like SELECT @@Version ; to the server and evaluate if it works or not. When it fails it must implement a reconnect.

This cannot be done by an additional application.
0
 

Author Comment

by:rayluvs
ID: 34971777
understood.
0
 

Author Closing Comment

by:rayluvs
ID: 35005930
thanx
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question