Question


I'm running out of ideas so checking if anybody can shed some light.

  • 2 tier Client-server application
  • SQL Server 2005
  • Workstation: Windows XP
  • Client-Server Application 1 uses SQL OLE DB Provider. (Provider=SQLOLEDB.1)
  • Client-Server Application 2 uses SQL Native Client. (System.Data.SqlClient.SqlConnection)

Somehow, application 1 works well but application 2 needs to have Timeout in connection setting to be 30 seconds to make it work.

Using a tip I learned from JohnnyCoder's Database Connectivity Test with UDL File, I tracked down the problem is somewhere around driver. When I try Microsoft OLE DB Provider for SQL Server, it connects immediately. When I try SQL Native Client, it doesn't take long. It fails even it I set connection timeout to be 60.

Both of the applications work well on other installations but not on one specific site. So it has to be related to some environmental settings such as security, firewall, etc.

I tried installing new SQL Server 2005 Native Client on workstation. No luck.

So my question is:

  1. Why does Application 2 ever make it work when the client actually cannot connect? Is there internal logic to use OLE DB when SQL Native Client timeout happens?
  2. What else would you take a look?
Was it helpful?

Solution

Answer: their network firewall blocked TCP/IP packets. As a result, SQL Native Client timed out with TCP/IP after 20 seconds and then tried Named Pipe which made it work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top