views:

8286

answers:

3

We have an application where our clients are connecting to a SQL Server 2005 database - via a SQL Native Client ODBC data source. We are having some difficulties with the ODBC connection getting severed during program execution. After questioning a tech support person, he said that he had seen this type of error before, but they fixed the issue by configuring the clients to connect using Named Pipes (primarily), rather than TCP/IP.

So I did some research and found where to configure client access on the server - via the SQL Server Configuration Manager. However, there does not appear to be a way to configure the SQL Native Client ODBC data source on the client machine itself. The older SQL Server ODBC driver did allow you to configure it to use Named Pipes, or TCP/IP, but the SQL Native Client does not.

Does the SQL Native Client data source automatically decided which method to use to connect to the database? Is there a way to configure it?…and is there a way to find out which method a particular client machine is using to connect?

Any help would be appreciated.

--Thanks Mike C.

+1  A: 

Maybe this will get you going:

4) If you are using SQL Native Client ODBC/OLEDB provider({SQL Native Client} or SQLNCLI), go to SQL Configuration Manager, click client protocols, make sure NP and TCP are both enabled. Right click properties of NP, make sure client is using the same pipe name as server for connection.

The node is actually 'SQL Native Client Configuration', You can change priority and disable from there.

from http://blogs.msdn.com/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx

Sam
I was aware of your information before posting my question, but having another person confirm it is good. However, configuring the 'SQL Native Client Configuration' on the server, is still missing something. In my tests it only works for some of the client computers. Am I missing something?
Clinemi
You are making this setting change on client machines, correct? You mention server - the only thing you need to do is enable named pipes in the surface area config.
Sam
A: 
  1. Not sure about Named Pipes being any sort of an answer for ODBC connection breaking. Without first identifying the source of the problem, I wouldn't count on named pipes. I might be wrong though. Can you see any error that may explain this problem? This may be network related.

  2. Otherwise, I think it should be quite easy to configure this on the client machine: just run cliconfg (SQL Server Client Network Utility). in the General tab make sure the Named Pipes protocol is enabled, then navigate to the Alias tab and simply create an alias for your server using Named Pipes.

Good luck.

adilei
My understanding of cliconfg is that it is not intended to work with the SQL Native Client drivers - but only with previous versions of SQL Server ODBC drivers. Having said that, experience has taught me that if you have an incorrect setting in cliconfg it breaks sql native client connections.
Clinemi
A: 

i had a question do we install the sql server on the client computer...an d exactly wat softwares or programs are installed on the client computer...kindly assist....

Regards ,

Elizabeth

elizabeth mwashuma
The sql server database itself should be installed on a server. The client computer which connects to the database, has the SQL Native Client driver installed so that when you connect to the database via OLEDB, or ODBC, you use that driver.
Clinemi