|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Open Connection for long timeI 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 -- Show quote____________________________________ 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. __________________________________ "MountainKid" <Mountain***@discussions.microsoft.com> wrote in message news:4EEECA08-5F7C-4882-92AB-C8AAC29FB345@microsoft.com... >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. On Thu, 20 Apr 2006 19:45:02 -0700, MountainKid
<Mountain***@discussions.microsoft.com> wrote: >I use ADO.NET to develop my project. If the code is the same on both servers there has to be a difference in the>(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. 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 |
|||||||||||||||||||||||