Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

/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 http://serverfault.com/a/35225/117216 for this useful bit of information.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.