?
Solved

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

Posted on 2011-02-23
13
Medium Priority
?
272 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 168 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 35

Assisted Solution

by:ste5an
ste5an earned 832 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 35

Assisted Solution

by:ste5an
ste5an earned 832 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 35

Assisted Solution

by:ste5an
ste5an earned 832 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 35

Assisted Solution

by:ste5an
ste5an earned 832 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 35

Assisted Solution

by:ste5an
ste5an earned 832 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

770 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