Solved

Identify when a connection was lost

Posted on 2012-03-20
5
259 Views
Last Modified: 2012-03-23
Hi,

I have a SQL Server box and when executing sql statements it usually returns with data but every great once in a while I am getting a connection timeout error.  Is there a way to find out when a network connection was lost and/or restablished?  SQL is running on Windows Server 2008.

thank you
0
Comment
Question by:yechan
  • 2
  • 2
5 Comments
 
LVL 39

Expert Comment

by:lcohan
ID: 37744437
"I have a SQL Server box and when executing sql statements it usually returns with data but every great once in a while I am getting a connection timeout error. "

Where is the timeout coming from?? SQL code object or outside sql app code?
You could change the SQL query timeout from default 600 seconds in 2005/2008 to 0 or unlimited but CAUTION don't just do that in a production SQL server. This way the queries will never timeout in SQL but connections may be still chopped from the app - connection timeouts or other defaults.

"Is there a way to find out when a network connection was lost and/or restablished?"
Yes, you can use SQL profiler for that but CAUTION again because if you just start a default trace AS IS against a busy production SQL server you may bring it down.
0
 
LVL 1

Author Comment

by:yechan
ID: 37746657
hi lcohan,

The timeouts are a result of running unit tests on a bamboo server.  The database itself is not very transactional and also it will be run against our test database, thus, not too worried about bringing down SQL Server.  Do you know how to configure profiler so that it captures only lost/restablished network connections?
0
 
LVL 38

Accepted Solution

by:
ChiefIT earned 500 total points
ID: 37755756
On a 2008 server, go to the start button and on the run line type "reliability". The reliability monitor will show you up/down times and most likely the cause of them.
0
 
LVL 1

Author Comment

by:yechan
ID: 37756533
Thank you chief.  This is a really cool tool.
0
 
LVL 38

Expert Comment

by:ChiefIT
ID: 37757502
WIN 7 ALSO OFFERS THAT TOOL... SO YOU CAN USE IT TO TROUBLESHOOT YOUR W7 DESKTOP COMPUTERS.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

856 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