Recently a classic ASP app that interfaces with SQL and Oracle was migrated from windows server 2003 (IIS6) to IIS 8.5 windows server 2012R2. Users are inconsistently getting an error when a connection opens up to Oracle, but not for SQL.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
*This is being thrown on 'cn.open' below
Set cn = server.CreateObject("ADODB.Connection")
cn.ConnectionString = strOracleConnect
cn.open
The server is using Oracle11g 64 bit driver with default ODBC settings. Fetch buffer size 64000, LOBs enabled, cache buffer size, with failover enabled (10/10). Each time it is reported by a user by the time I get to their desk or try it myself I can't reproduce. 98% of the time it works without issue. Any help or suggestions would be appreciated, I feel this has to be a configuration problem but I can't seem to gain any ground on this and it doesn't help that I can't reproduce it.
Under IIS Manager, go to
Application Pools --> [YOUR APP NAME] --> Advanced Settings
Enable 32-bit Applications --> Select TRUE
Load User Profile --> Select TRUE
It was worked for me, hope helps for you also..
Related
I've moved a legacy Classic asp app to Windows server 2016
in large part to resolve TLS 1.0 browser issues. The website works just like it should except for one problem. Updating a DB record fails.
I've set up syswow64 DNS and used a 32 bit Oracle 11g express install on the webserver to talk with the Oracle 11g standard DB. Everything seems to be fine with the application except when updating a sequence table. The code worked fine previously on windows server 2008.
rs.open sql, cn, adOpenDynamic, adLockPessimistic, adCmdText
If CheckNativeError(cn, SQL, Current_Sub_name) then
fGet_Next_SEQ_ID = ""
exit function
END IF
Opening and reading the recorset works and now need to update the
rs("NEXT_SEQ") = NEXT_SEQ (next seq = 222250)
rs.Update
Receives the following error.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC driver for Oracle]General error
I'm thinking it is unable to update possibly by a driver issue involving a TLS 1.2 issue but I cannot find the answer why or what to do about it. Other settings for the website are correct, enable 32-bit code.. app pool, etc.
32 bit Driver used: Microsoft ODBC for Oracle
Switching to the Oracle XE driver instead of the Microsoft for Oracle driver fixed the issue. I've tested all the pages and it works fine. Looks like the Microsoft 32 bit driver will not be useful any longer with the TLS 1.2
When my colleague attempts to connect he is having no issues. We both have previously been granted access to the server, and have established this is not an issue as my colleague can access the server on my Desktop though I cannot access the server on his desktop. (We both could up until recently when we had had to renew the server connection passwords).
We are both operating off 64-bit, Windows 10 desktops with the same Java version and are both using Oracle SQL Developer 19.2.1.247.
When I go to about properties and compare both in excel we see no differences.
We're quite confused why this is happening.
I have a server with IIS that hosts web sites.
Some of those web sites (Silverlight) must connect to an Oracle Database to perform queries via OleDb, but they cannot.
Here are the results of what I tested :
'msdaora' provider is not registered on local machine when I run it in the web site
ORA-01019: unable to allocate memory in the user side (when I try to connect with a test console program without administrator status)
Connection OK (with the same test console program WITH administrator status)
ORA-12154: TNS:could not resolve the connect identifier specified when trying to switch to another method of connection (from OleDb to Oracle.ManagedDataAccess.Client)
I went through countless info about these kind of errors but I couldn't find any working solution.
Here is what I tested :
giving "create global objects" right to the relevant users (no change at all)
installing several Oracle clients one after another. Best result is with 10.2 client 64b (where my test program can connect while having administrator rights). The install is clean (no several Oracle folders nor several Oracle environment variables at the same time)
disabling warnings concerning the administrator elevation (ie no confirmation pop up during elevation) : no change at all
checking RAM usage (plenty of memory under the foot)
Additional infos :
The connection string is
Provider=msdaora;Data Source=HOSTNAME;User Id=USER;Password=PASSWORD
Same connection string used with OleDb and Oracle.ManagedDataAccess.Client.
The tsnames.ora file exists (and works, as show my succesful attempt with the administrator test program)
It's working on an older web server, but there are too much differences for me to find any meaningful one (different Windows, 32/64b, different IIS versions, different Oracle client)
Any idea ?
There are several points:
Microsoft msdaora provider for OLE DB is deprecated for ages. You should prefer the Oracle Provider OraOLEDB.Oracle.
Oracle Client and OLE DB provider and IIS application have to have the same architecture, i.e. all must be either 32 bit or 64 bit, you cannot mix them. (ancient msdaora is not available for 64 bit). However, ODP.NET Managed Driver (Oracle.ManagedDataAccess) works for both 32 bit and 64 bit.
When you use ODP.NET Managed Driver then Provider=MSDAORA is not needed in ConnectionString. I assume such attributes is ignored or you just missed to mention it.
Version of Oracle Client and OLE DB provider must match (even minor version). Due to COM limitation you cannot install more than one OLE DB provider for 32 bit and 64 bit each.
Search pattern for tnsnames.ora file in OLE DB is different to search pattern in ODP.NET Managed Driver. Verify following items:
OLE DB reads your Registry for TNS_ADMIN value, the ODP.NET Managed Driver does not.
ODP.NET Managed Driver uses your .NET config file (i.e. web.config, machine.config) to determine location of tnsnames.ora file, the OLE DB does not.
According documentation ODP.NET Managed Driver does take into account the TNS_ADMIN Environment variable and folder %ORACLE_HOME%\network\admin. However, according to my tests it does anyway.
Regarding connection failure is depending on "Rus as Administrator" check permissions of your Oracle installation folder.
I have a legacy VB6 application, which is making ODBC connections to a proprietory 3rd party database using ODBC.
Dim con As Object ' New ADODB.Connection
Set con = CreateObject("ADODB.Connection")
con.Open ("DB64bitDSN")
It used to work until now. Recently they have installed 64 bit version of the 3rd party database. The 3rd party database automatically creates a 64 bit ODBC DSN during installation, and the same is working when I connect using Excel's Data Connection Wizard, and using ODBC DSN as the data source.
But my code is giving error:
Error Description: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
Error Source: Microsoft OLE DB Provider for ODBC Drivers
How should I change my code to make it work? Do I need to add a reference to any library and modify my code?
Thanks.
You do not need to change the code. You need to ask "them" to create a 32-bit ODBC DSN. VB6 requires this in order to connect.
There is more information on this Microsoft page.
Extract from the page
To manage a data source that connects to a 32-bit driver under 64-bit
platform, use c:\windows\sysWOW64\odbcad32.exe.
I'm getting an error from report:
The OLE DB provider "MSDASQL" for linked server "linkname" reported an error. The provider reported an unexpected catastrophic failure.
I'm checking to find out the installed driver and port number from the Windows server 2008 R2. I checked in "C:\Windows\System32\drivers\etc" services file, but unable to get which exact service I need to check?
My ODBC data source administrator window is listing below drivers:
1. MySQL ODBC driver
2. Oracle in OraClient 10g
3. SQL Server
4. SQL Server native client
How can I find the detailed information; what is the current driver installed on what port number ? Is the current driver installed is compatible with Progress DB ? If it's not compatible, which latest driver I need to install to make it compatible with Progress 11?
You will need to download the SQL Client Access software from Progress web site.
https://www.progress.com/support/evaluation/download-resources/download-center
Look for the SQL Client Access: