Open Connection for long time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use ADO.NET to develop my project.
(use SqlClient.SqlDataConnection object to conection SQL 2000)

It is stranger that Connection.Open() method spect 12 seconds to execute in
one of our servers, but it is faster in another server, not more than 1
second.
Both two servers have almost identical hardware.

Although I can use connection pooling to avoid re-create connection.
But I want to know why it is happen.

Does anyone can tell me what items I need to measure or tune?
Thanks a lot for your reply.
 
Hummm... as I understand your question, you have discovered that it takes 12
seconds to open a connection to SQL Server 2000--but just on one server.

I would use the SQL Server Enterprise Manager to see what the server is
doing--it might be very busy. Okay, that might seem obvious, but there could
also be other issues. Are you referencing the server (machine name) by DNS
name or by IP address? We have seen situations where the DNS registration is
incorrect and the system takes some time to get the name resolved. Try
switching to IP/TCP Port addressing to see if this fixes the problem. Yes,
pooling the connection will help reduce subsequent connection time.

hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
I use ADO.NET to develop my project.
(use SqlClient.SqlDataConnection object to conection SQL 2000)

It is stranger that Connection.Open() method spect 12 seconds to execute in
one of our servers, but it is faster in another server, not more than 1
second.
Both two servers have almost identical hardware.

Although I can use connection pooling to avoid re-create connection.
But I want to know why it is happen.

Does anyone can tell me what items I need to measure or tune?
Thanks a lot for your reply.

If the code is the same on both servers there has to be a difference in the
servers, unless you deployed your debug executables tot one of the servers.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 
Back
Top