SQL Server Connection establish time
-
Monday, October 08, 2012 11:19 PM
Hi Folks,
I have a requirement to get the time taking for SQL Server to establish a connection for app server request. I am not aware of any SQL Server profile trace event and perfmon counter for this. Does anyone have idea about tracing this information from SQL Server?
Thanks
Pradeep
All Replies
-
Tuesday, October 09, 2012 3:27 AM
Hi Pradeep,
I think it is not possible to track this by default, you need to write your own custom script along with an application out side the scope of SQL Server if you wish to consider network latency also.
Sarabpreet Singh Anand
This posting is provided , "AS IS" with no warranties, and confers no rights.
Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.
- Marked As Answer by LMPradeep Wednesday, October 10, 2012 10:38 PM
-
Tuesday, October 09, 2012 3:29 AM
though- you can still calculate how much time SQL Takes to process DDL Triggers and\or resource governor if deployed before a connection was successful through below mentioned event classes:
PreConnect:Starting Event Class
PreConnect:Completed Event Classa difference in both these will tell you the latency caused by either DDL Trigger and\or Resource Governor
Sarabpreet Singh Anand
This posting is provided , "AS IS" with no warranties, and confers no rights.
Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.
-
Tuesday, October 09, 2012 3:04 PMModerator
This would need to be done from the client side, not the SQL Server side.
There are many, many variables in connecting to SQL Server, DNS, SQL Browser, IP or named pipes, connection pooling, etc. What exactly are you looking for?
- Proposed As Answer by Shulei ChenModerator Wednesday, October 10, 2012 7:49 AM
- Marked As Answer by LMPradeep Wednesday, October 10, 2012 10:39 PM
-
Tuesday, October 09, 2012 4:08 PM
Hi Tom,
Basically, I am trying to get the time taken by SQL Server to establish the connection after it recieves connection request from client. I am not worrying about network latency.
Pradeep
-
Tuesday, October 09, 2012 4:11 PM
Hi Sarabpreet,
But in this case we don't have any LOGON triggers defined on server and it also won't give the time taken to establish the connection. Also, in this case I can't consider network latency.
Please correct me if I am wrong.
Pradeep
- Edited by LMPradeep Tuesday, October 09, 2012 4:28 PM
-
Wednesday, October 10, 2012 7:49 AMModerator
Hi Pradeep,
Like Tom said, this need to be accomplished in the client side.
Best Regards,
Ray Chen

