Monday, August 14, 2006

Not able to connect Sql Server 2005 Express remotely

"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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) "

By default, when you install Sql Server 2005 Express Edition, it will not allow the applications or clients to connect remotely as like OracleXE. This causes the sytem to throw the above error message.

To enable the remote connection,
  • Go to Start - Programs - Microsoft SQL Server 2005 - Configuration Tools - SQL Server Surface Area Configuration
  • Click the link "Surface Area Configuration for Services and Connections"
  • Now expand the tree SQLEXPRESS - Database Engine - Remote Connections in the "View by Instance" tab
  • Select "Local and remote connections" and "Using both TCP/IP and named pipes" and apply the changes

No comments: