Deru Knowledgebase
Search:     Advanced search
Browse by category:
Contact Us

How to configure SQL Server 2005 to allow remote connections

Add comment
Views: 3777
Votes: 0
Comments: 0
Posted: 28 Jun, 2009
by: Vinisha G.
Updated: 04 Aug, 2012
by: Majoosh C.
When you try to connect to an instance of Sql Server 2005 from your application or froma remote computer most of the times you may get an error message. Because by default, SQL Server 2005 doesn’t allow remote connection so you have to enable it manually. If you try to connect to remote SQL Server without enable remote connection first, you’ll see one of these error messages:

   1.      Sql server does not allow remote connections.
   2.      SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified.
   3.      An error has occured 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:Named Pipes Provider,error:40-Could not open connection to SQL Server))Server does not exist or access denied.

Steps for resolution:
---------------------------

   1. Enable remote connections on the instance of SQL Server that you want to connect to from a remote computer.
   2. Turn on the SQL Server Browser service.
   3. Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.

Enable remote connection:
---------------------------
If you use Sql Server Management studio then:

open.
Connect to the remote server.Right click on the server instance.Select properties.
Click Connections.Check to allow remote connections to this server.

If you use Express or Developer edition then follow the below steps:

Click Start -->> Programs -->> Microsoft SQL Server 2005 -->>
Configuration Tools -->> SQL Server Surface Area Configuration.
Now click Surface Area Configuration for Services and Connections.
Now expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.

Restart MSSQLSERVER service from
Start -->> Control Panel -->> Administrative Tools -->>
Service -->> Select MSSQL Server -->> Restart Service

Enable Sql Server Browser service:
---------------------------------------------------

One thing noted that this may increase security risk. Microsoft recommend that you use this process only if you really require this process.To enable the SQL Server Browser service, follow these steps.

Click Start -->> Programs -->> Microsoft SQL Server 2005 -->>
Configuration Tools -->> SQL Server Surface Area Configuration
Now click Surface Area Configuration for Services and Connection
Select SQL Server Browser -->> Select Startup type Automatic -->> Apply

Create exception in windows firewall for SQL Server:
--------------------------------------------------------------------------

If you are running a firewall on the computer that is running SQL Server 2005, external connections to SQL Server 2005 will be blocked unless SQL Server 2005 and the SQL Server Browser service can communicate through the firewall. You must create an exception for each instance of SQL Server 2005 that you want to accept remote connections and an exception for the SQL Server Browser service.

Open Start -->> Control Panel -->> Windows Firewall
Select Exceptions tab -->> Add Program -->> Browse
Click the C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe executable program, click Open, and then click OK.
Others in this Category
document How to find uptime of a windows/Linux server ?
document Adding SPF Record in the Windows DNS server
document Monitoring and terminating runaway process in Windows
document FTP login problem in Windows Plesk platform
document Schedule MSSQL backup in 2005 with maintenance clean up task
document To open the port range in windows firewall
document How to create a new user on Windows 2000 & 2003 Server?
document How to password protect a folder in IIS?
document HOW TO: Create a New Zone on a DNS Server in Windows Server 2003
document Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
document How to create a new user for a database in Microsoft SQL Server 2005
document Steps to clear Browser cache
document How to clear DNS Cache
document How To Check SMTP Logs in Windows Server (IIS)
document Unable to restart website in IIS due to error message "Not enough space is available to process this command".
document An IIS alternative module to Apache mod_rewrite module to fix wordpress permalinks
document How to create a new user on my Windows 2000 & 2003 Server?
document Backup and restore database via plesk.
document How to create a website using IIS?
document How to open a port in Windows firewall
document How to setup a custom RDP port on Windows ?
document Creating Email Account in MailEnable
document Block an IP address in windows server using IPSec
document Creating FTP user in Windows Server
document Windows server RDP from a Windows PC
document Whitelisting IP address in MailEnable
document Add a user to the Remote Desktop Users group
document Upgrading MS SQL 2000 to MS SQL 2005



RSS