SQL 2005 Remote Connection Errors

“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. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified) when connecting SQL server remotely

Make sure that the SQL instance name is specified correctly and not misspelled in the connection string.

SQL browser service is enabled and running on the server.

Enable TCP/IP and named protocol for the SQL server with the steps below:

Click on START >> Program files >> Microsoft SQL server 2005 >> Configuration tools >> SQL Server configuration manager.
Expand SQL server 2005 Network Configuration and select Protocols for MSSQLSERVER$INSTANCE-NAME
Right click on Named Pipe and select Enable and also on TCP/IP and select enable.

Double click on TCP/IP and select the IP address Tab and set Enable to Yes for the IP that you wish to be enabled for remote connection.
Click OK and restart MSSQL server.

Now follow the same steps for SQL Native client configuration >> Client protocols.

If you have a firewall on the server then make sure that SQL TCP port and UDP 1434 is added in exception including File and Printing service.

If you still have an error then change the SQL protocol to run as a default instance but you should have any other SQL server running on default instance on the server. You can follow the steps below:

Click on START >> Program files >> Microsoft SQL server 2005 >> Configuration tools >> SQL Server configuration manager.

Expand SQL server 2005 Network Configuration and select Protocols for MSSQLSERVER$INSTANCE-NAME

Double click on TCP/IP and select the IP address Tab and set TCP Port from blank to 1433 and Dynamic port from a number to blank.

Click OK and restart MSSQL server.

Now follow the same steps for SQL Native client configuration >> Clint protocols.

Now remove the INSTANCE-NAME from the connection string and then try to connect.

Above steps are for the error ID – 26, if you get error ID – 40 then make sure that your the SQL server is running and accepting connection. Also make sure that port TCP 1433 and UDP 1434 is enabled in the firewall if you have any.

Gửi phản hồi

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s

%d bloggers like this: