Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SQL Server does not exist or access denied

Author  Topic 

xx75vulcan
Starting Member

4 Posts

Posted - 2007-06-19 : 11:57:36
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 (attempting to hit the SQL 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:

'Create and Open Connection Object
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.ConnectionString =
"dsn=**********;uid=*********;pwd=********;"

I noticed an event on the server (hosting SQL) event log when
attempting to connect from the first box.

Error:
An anonymous session connected from <NameofboxrunningSQL> has attempted to open an
LSA policy handle on this machine. The attempt was rejected with
STATUS_ACCESS_DENIED to prevent leaking security sensitive information
to the anonymous caller.

Upon further investigation, lead me to this MS KB: http://support.microsoft.com/kb/839569

Stating "Instead of allowing the anonymous connections to your
instance of SQL Server, you can grant the required access to a
specific SQL Server account and pass the logon credentials for the SQL
Server account in the connection string in the ASP.NET page. Using SQL
Server authentication avoids the anonymous connection attempts to the
instance of SQL Server and is more secure."

I'm passing the SQL login credentials in my connecton string, and the
ODBC manager specifies a SQL account -- why does it tell me it's
attempting an annonymous connection?!?!?!

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-19 : 13:13:11
Tried with tcp/ip netlib instead of named pipes?
Go to Top of Page

xx75vulcan
Starting Member

4 Posts

Posted - 2007-06-19 : 13:27:57
Yeah, Gives the exact same error:

[Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not exist or access denied.
vs
[Microsoft][ODBC SQL Server Driver][TCP/IP]SQL Server does not exist or access denied.
Go to Top of Page

xx75vulcan
Starting Member

4 Posts

Posted - 2007-06-19 : 13:41:28
Do I need to have anything fancy installed on the web server (like SQL tools) or anything to be able to connect to the second web server that hosts SQL database? I don't believe so. Just checking
Go to Top of Page

xx75vulcan
Starting Member

4 Posts

Posted - 2007-06-19 : 15:06:42
ANSWER:
I figured it out, but wanted to post for anyone else experiencing this issue.
While this was a very very odd solution for me, it might just work for you.

On the second box - that hosts SQL Server, IIS was running, and the default.htm page - - for whatever reason, included a redirect to the homepage on the primary server.

I can only assume the connection string (pointing to the sql box) was being redirected to the primary server - where there was no sql server.

chris
Go to Top of Page
   

- Advertisement -