I am trying to create a linked server object via SQL Server Management Studio, and I am getting the following errors:
SQL Network Interfaces: Error getting enabled protocols list from registry [xFFFFFFFF].
OLE DB provider "SQLNCLI" for linked server "Foo" returned message "Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "Foo" returned message "An error has occurred while establishing
a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.".
This is using "SQL Server" type, but I get it even if I create it via SQL statement. I can connect to the target server "Foo" from other machines without problem. How can I fix this?
First (just in case...) make sure you have a protocol enabled for the SQL Native Client. Go into SQL Server Configuration Manager, expand SQL Native Client Configuration, click Client Protocols and check that there is at least one protocol enabled (preferably TCP/IP and/or named pipes).
If this is the case, then have a look in your registry for this key:
and look at the 2 values there (ProtocolOrder and ProtocolsSupported), there might be something messed up with them.
These should be REG_MULTI_SZ values. ProtocolsSupported should be sm tcp np via. ProtocolOrder should have on entry for each protocol you have enabled, in the order from right to left that you want them to be.
sm = Shared Memory tcp = TCP/IP np = Named Pipes via = VIA
So, if you have TCP/IP enabled and listed first, then Named Pipes, then Shared Memory, and VIA is disabled your value for ProtocolOrder would be
tcp
np
sm