Web server and SQL server both are running on the different machine. The below is the connection string that we are using to connect MS SQL database from classic ASP web application.

set oConn = server.createobject("ADODB.Connection")

oConn.open "PROVIDER=SQLOLEDB;Data Source=xxx.xxx.x.xx,1433;Network Library=DBMSSOCN;Initial Catalog=databasename;User ID=xxxxx;Password=xxxxx;"

No idea why it's loosing the database connection in the middle of uploading the page. Here is error message that we got.

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Already verified SQL server 2005 remote connection settings and default port number. * Remote connections are enabled in SQL Server as per http://support.microsoft.com/kb/914277

  • Is SQL server enabled to receive remote connections? Can you access that SQL server any other way? Is it only the ASP app that can't access it? – Sean Howat Mar 31 '10 at 15:07
  • Yes, the remote connections are enabled in SQL server. The database connection string works but it stops couple of times during the day and it gives an error Microsoft OLE DB Provider for SQL Server error '80004005' [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Don't know why? If you refresh the asp page, it works but it's annoying. Any idea why it's doing it? Yhanks. – shah Mar 31 '10 at 18:40
  • It seems strange that the connection string would just stop working a few times a day. Is it at a specific time or is it random? Does the outage last for any period of time? – Sean Howat Mar 31 '10 at 19:11
  • This could be a network issue. You may need to run a trace using something like Wireshark on the webserver to capture the packets. Then, when you experience one of these errors, look at the packets for that time and see if there is anything strange. (e.g. Outgoing packets without incoming packets, Packets being sent to the wrong host, etc.) – DCNYAM Mar 31 '10 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy