Thursday, February 16, 2012

Accessing SQL Server on another machine

Hello all.

I am currently running a web server with Windows 2000 Server installed. It is a Pentium II 400 MHz, and also acts as the router on our network. I am worried that installing MSDE on this same server might drain the server resources, so I installed MSDE on one of the computers in our internal network. How do I set up my connection string to access the database on another machine in the same network?

Currently I use: Server="AnotherComputer";TrustedConnection="True";Database="MyDatabase"

When I use that, it tells me that the server can't be found. All computers behind the router have static IP addresses, but even when I type the IP address it still can't find the server. Any suggestions?First thing: It would be better to use the SQL Servers IP address than the name.

Second: Trusted Connectivty will be a problem unless you do some sort of impersonation. ASP.NET runs under the guise of a process which requires an account for credentialing. Normally this is the ASPNET user in Windows 2000 and NETWORK SERVICE in 2003. For trusted connection to work this user must have db access.

Third: Can you even see/ping the SQL Server from the web server? Is TCP/IP enabled or just named pipes?

No comments:

Post a Comment