SQL 2005 Remote Connections
I have this irritation with SQL 2005 and remote connections. Maybe its something I am doing incorrectly (which is very possible).
Everytime I install a new SQL 2005 server and then try using an application that I have developed to connect to that SQL 2005 machine, I get a SQL Protocol Error 25, “Cannot find the SQL server or the instance specified”.
The environment
- Windows 2003 Forest/Domain (Single Forest Single Domain SFSD)
- SQL 2005 Server (with SP1) and when installing SQL 2005 I check “Enable Remote Connections”
- 4 Different Windows clients (from Windows XP to Windows 2003)
- Application developed using .net 2.0
- Application is doing a normal SQL connect and Select * from SomeTable
I first thought it was because I was only using the ServerName in the connection string i.e. "MyServer", but then tried the following:
- Myserver
- Myserver.mydomain.myname.com (Fully Qualified Domain Name {FQDN})
- Myserver\<SQLInstanceName>
- Myserver.mydomain.myname.com\<SQLInstanceName>
- Ip_Address
- Ip_Address\<SQLInstanceName>
With all these I get the same ERROR (See above), I triple check on the server properties that "Allow remote connections" is checked!
So what I have found works EVERY time is go to: SQL Server Configuration Manager > SQL Native Client Configuration > Aliases > Create New Alias.
I then create a new Alias with the Name being the NetBios name of the server. I then restart the SQL services, and PRESTO!
All of a sudden all the clients can see the SQL server and connect as they should be doing.
I just want to know:
- What am I doing wrong
- Is this normal behavior
- Is this "by design"
- What am I missing here?
Frustrated!
Carlos Magalhaes