I have to move some customer sites from a very old IIS Server to a newer one, and some sites have troubles to work in the correct way. Most of them complain about a failure called:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified.
I've read on the internet that this could depend on missing rights given to the user; other sites states that a Temp folder is missing (I can't imagine that this is right)… There are several other "solutions":
Open the rights for everyone on the server (as someone stated) is not an option for me. Also it is very painful to give explicit rights to every customer (there are several customers which needs the rights).
Do you know an easier solution, a similar way, or an alternative?
That error is nearly always caused by a bad connection string when an ADODB.connection
object has its .open()
method called.
For example, take the following code:
Dim SqlUsername : SqlUsername = "YOURSQLUSERNAME"
Dim SqlPassword : SqlPassword = "YOURSQLPASSWORD"
Dim ConnectionString : ConnectionString = "DRIVER={SQL Server};SERVER=YOURSERVERNAME;DATABASE=YOURDATABASENAME;UID=" & SqlUsername & ";PWD=" & SqlPassword
Dim db
Set db = Server.CreateObject("ADODB.Connection")
db.Open ConnectionString , SqlUsername , SqlPassword
Note how the connection string includes a driver identifier, in this example that is SQL Server.
Somewhere in your application you'll have an adodb.connection.open()
method being called with a connection string, you need to find it, determine the driver being used and install it on your server.
Another thing to keep in mind, some data source drivers are 32bit and if your running your website in a 64bit application pool in IIS you'll need to allow 32bit objects - see this related question on that: Uploading picture after migration from IIS 6.0 to IIS 7.5
I have got the similar issue while working with classic asp and with IBM DB2 ODBC Driver
. I do have two websites configured in my local IIS 7.5
, Connection.Open is working fine with default web site whereas it does not with the second website, after several configuration changes as per my knowledge and as per sugesions from stackoverflow did not helped me in this case.
What worked for me is to enable (Set to True) the 32bit
applications Advanced setting of ASP.NET V4.0
Classic Application Pool.
Application Pools-->ASP.NET V4.0 Classic-->
Advanced Settings--> under General Options double click Enable 32-bit Applications to set to True.
This small configuration may help some one who has the same issue.
Your old server has some ODBC DSN (Data Source Names) defined, and this is how your applications are connecting to the databases. You need to define these on your new server. Look in your server's Control Panel.
For sure now you have solved your problem but nevertheless for knowledge purposes here is what can work:
On top of what @webaware said please follow the steps below on your new server machine:
Note: Ask your database administrator for the correct TNS Service name and User ID. You will also need the user id for testing your connection.
Your connection should be successful now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With