1

I am trying to connect to a remote MS SQL Server 2008 SP3 x86 Instance using it's name.

At the first glance all seems to work well (e.g. it is possible to connect to the server locally and succesfully telnet it's port remotely), but there is a thing I can't understand...

This line should connect us to the default instance of remote SQL Server:

osql -S ServerIP -d MyDatabase /U sa -P MyPassword

and it does the trick, however the next one:

osql -S ServerIP\MyInstance -d MyDatabase /U sa -P MyPassword

ends up with the following error:

[SQL Native Client]SQL Network Interfaces: Error Locating Server/Instance
Specified [xFFFFFFFF].
[SQL Native Client]Login timeout expired
[SQL Native Client]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.

The only instance running on the server is MyInstance, which is (I guess) the default one.

Could you please put some time in explaining the issue.

Max
  • 21
  • 4

2 Answers2

1

/selffix/

The key to understanding the issue was to read about "SQL Server Browser" service.
http://msdn.microsoft.com/en-us/library/ms181087

Specifically:

However, if the SQL Server Browser service is not running, the following connections do not work:

   • Connecting to a named instance without providing the port number or pipe.

It took unly to start the service and open UDP port 1434 in firewall to make things work properly.

By the way, fo those who like me might stumble upon checking if a UDP port is open, here is the answer: PortQry Command Line Port Scanner.
http://www.microsoft.com/download/en/confirmation.aspx?id=17148
Thanks to https://serverfault.com/a/35225/117216 for this useful bit of information.

Max
  • 21
  • 4
1

...and also make sure your server instance is set to start automatically and started under services.msc

Vincent
  • 11
  • 1