Web Server Can't Connect to Sql Server
- From: xx75vulcan <xx75vulcan@xxxxxxxxx>
- Date: Mon, 18 Jun 2007 14:23:28 -0700
Hi,
I have two seperate production machines that I'm trying to get to play
nicely together.
This setup has worked for years before - until recently bother
machines were reformatted, and reinstalled fresh. I know I'm missing a
simple setting here somewhere...
I have a Win 2003 IIS 6.0 box running as web server, and a Win 2003
IIS 6.0 box running as a web server with SQL 2000 Server installed.
I can write ASP scripts to access the SQL Server but they only work
from the box running the SQL Server.
If I write ASP scripts to run from the first Win 2003 Web server,
trying to connect to the second box actually running the SQL Server it
gives an error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not
exist or access denied.
If I open up the ODBC Admin on the first Web Server box, and create a
System DSN, and supply it with a SQL Login (the SQL Server is set to
mixed authentication mode and not strictly windows authentication)
the login and test say they complete successfully. However, whenever I
run the ASP script, it errors out.
Example of Connection String that works on box running SQL but not on
first box that is trying to connect to SQL:
strSQL = "SELECT TOP 10 * FROM MAIN ORDER BY [Key] DESC;"
'Create and Open Connection Object
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.ConnectionString =
"dsn=**********;uid=*********;pwd=********;"
'System DSN is established on the non-sql machine that this
script is running from
'uid & pwd are SQL accounts.
objConnection.Open
set RsList = objConnection.Execute(strSQL)
I'm sure I've left out vital peices of info here- so please let me
know what you need to know to offer advice.
Much thanks!
-xx75vulcan
.
- Follow-Ups:
- Re: Web Server Can't Connect to Sql Server
- From: Erland Sommarskog
- Re: Web Server Can't Connect to Sql Server
- Prev by Date: Re: Help with database design.
- Next by Date: Re: Help with database design.
- Previous by thread: Hiding the Database list from a certain user\group
- Next by thread: Re: Web Server Can't Connect to Sql Server
- Index(es):
Relevant Pages
|