Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Website Unable to Connect to Database

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
hi experts,

This is Sql 2000 and IIS 5.

We have a server that runs IIS 5 AND the SQL Server 2000 database used by the website.

We have never been able to use the website. We can hit the main login page. But after entering the user/password it just sits there. No errors are displayed in the browser .

I did find a line in the IIS log that says:
" DBNETLIB .... SQL_Server_does_not_exist_or_access_denied"

Nothing in the Event log. Nothing in the SQl Server logs.

Apparently this error can have a multitude of causes so it is hard to determine a fix.

Facts: We are not using Active Directory. The server is on it's own domain. Server has both dtabase and website.

What are the most likely causes, things I should check first?

Thanks. John
 
After entering a username and password, I assume you are building a connection string that you use to connect to the database. Can you show us your connection string?



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
You can use this site as a reference.


For various reasons, you would be well advised to use a connection string from the OLE DB section. Not ODBC.

I forgot to mention it earlier, but for obvious reasons, replace the username and password in the connection string with XXXX. [smile]

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
he he. The user name is 'sa'. Against my best advice, they insisted !!

If I'm using an OLE DB connection, I don't need to create an ODBC Data Source, right?

John
 
Right. No ODBC Data Source.

If you are at all responsible for this database, you should insist that they NOT use SA. Seriously. There is not a SINGLE authoritative site/article/book/(10 year old with a little common sense) that would recommend using the SA user to connect from a website.

I have an 8 year old daughter. Her name is Coalesce Mastros (her nick name is IsNull). When I told her that you were using the sa account, she started rolling on the floor laughing. [rofl]



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
George, glad that your daughter got a laugh on us. I get one almost daily.

After changing some ini files in the web site, we no longer get DBNETLIB .... SQL_Server_does_not_exist_or_access_denied" in the IIS log.

But there's no change - still does not move past the login page.

I'm thinking we have other issues. Not really SQL Server permissions related.

The connection string was working on the old server (we are moving the website) so of course we changed the pertinent parts - I think it is ok.

But I may have to post back here after we can make some progress in moving past this current roadblock.

Thanks. John
 
.... this was not a SQL Server problem at all.

Friday we discovered a couple of .DLLs that were missing from the website folders. Now the web user can navigate the web site.

Whew! Glad I didn't have to post that ugly connection string :)

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top