Last post Mar 22, 2007 07:28 AM by mykhan
Mar 21, 2007 10:35 AM|mykhan|LINK
I have configured a website on a windows 2003 server, while its database is residing on a remote server with sqlserver 2000 database. In the connection string, I use the server IP address for the remote SQL server, and when the website
is browsed, i get an error something similar to the one below:
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)
If I test the same website on windows XP, it will connect to the remote server without a problem. Can Anyone please give me a tip about the windows operating system, what should I do to over come this?
Thanks in advance
Mar 21, 2007 04:36 PM|TATWORTH|LINK
The title of you post is SQL2000 however the body of your post mentions SQL2005. I will assume 2005. The first step to diagnosing the problem is as follows:
1) On the web server create an empty text file and rename it to X.UDL.
2) Double click on X.UDL and the connection dialog will open.
3) Click the provider tab, select Microsoft OLE DB Provider for SQL Server and click Next.
4) Select the SQL Server (you will probably need to use its IP address.
5) Select authentication mode and enter credentials if using a specifc user name and password. (Also ticj the allow saving of password.
6) Select the database and click test connection.
7) If the connect test works, save the string and compare to your existing one,
You may need to use the SQL2005 Surface area Configuration Utility to allow remote connection. However if you need to do that, why did the connection from XP work. Are your three machines all on same domain?
Mar 22, 2007 07:28 AM|mykhan|LINK
Thank you very much TATWORTH for your quick reply.
I managed to work it out, Actually it was nothing to do with the sqlserver, rather it was a problem in windows security policy. I assigned a policy in local security policy for server (request security) for IP traffic and its working now.