SQL server connection error and cliconfg

Hi Folks;

I had a problem with connecting to an SQL server remotely:

ConnectionOpen(CreateFile()). Client unable to establish connection

I then tracked the problem down to named pipes. I found a solution in cliconfg by changing the network protocol to TCP/IP however this is not satisfactory as the problem exists with dozens of computers and the lab administrator doesn't want to have to run this on ever single system.

I made another attempt on the SQL server end by running SQL Server Configuration Manager for SQL Server 2005. I enabled "Named Pipes" and restarted the service. Unfortunately this did not resolve the situation. So is there something else I can do on the SQL server end or is there a command-line paramter for cliconfg that can configure the network protocol automatically (i.e. in a batch file or in the application I've created)?

[894 byte] By [canadian_coder] at [2007-12-22]
# 1
Hi,

the information for that is tored in the registry, look in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\SuperSocketNetLib

You can easily write a script or a reg file for that.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

JensSuessmeyer at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 2
Hi,

the information for that is tored in the registry, look in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\SuperSocketNetLib

You can easily write a script or a reg file for that.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

JensSuessmeyer at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 3

Hi,

Thanks for the info but I probably should have clarified I'm ran cliconfg on the client rather than the server (the client doesn't have SQL 2005). However, your suggestion did lead me to a fix (the registry key was actually located at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo).

Thanks again!

canadian_coder at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 4

Hi,

I'm surprised that enabling named pipes on the server didn't resolve the problem. It could be a firewall issue -- make sure the exception for "File and Print Sharing" is enabled on the Windows Firewall on the server machine. Also keep in mind that if this is a named instance, you will likely have to addtioinally open UDP port 1434 to allow SQL Browser to return connection information to the client.

Otherwise, please try connecting explicitly to the server's named pipe to see if you can connect:

default instance : "osql /Snp:\\<hostname>\pipe\sql\query";
named instnace: "osql /Snp:\\<hostname>\pipe\mssql$<InstanceName>\sql\query"

and let me know the results.

Il-Sung.

Il-SungLee-MSFT at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...

SQL Server

Site Classified