[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Identify when a connection was lost

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
yechan
Asked:
yechan
  • 2
  • 2
1 Solution
 
lcohanDatabase AnalystCommented:
"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
 
yechanAuthor Commented:
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
 
ChiefITCommented:
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
 
yechanAuthor Commented:
Thank you chief.  This is a really cool tool.
0
 
ChiefITCommented:
WIN 7 ALSO OFFERS THAT TOOL... SO YOU CAN USE IT TO TROUBLESHOOT YOUR W7 DESKTOP COMPUTERS.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now