we upgraded a user to windows 10 and we are having issues configuring the ODBC connect with Oracle.
We got both the 64bit and 32bit drivers installed. I know the OBDC for 32bit is syswow64 and 64bit is on the system32.
I guess the user has two version of the same application. One uses the 64bit drivers and the other version uses the 32bit driver. They both use the same name inside the obdc connect. When we try to add the 32bit connection it overwrites the 64bit connection. I'm guessing because its the same name.
Is there a way to add two odbc connections with the same name, but one being a 32bit and the other being a 64bit?
The user say you have to map the two drivers together and something and about using the odac oracle install. When i installed i just uses the oracle client install as administrator. The oracle version is 12.2
When I've had this issue, I've had to set up two versions of the driver and reference them independently. I'll have "Oracle32" and "Oracle64" and then reference the one the application calls for. I hope that helps!
In earlier Oracle versions by default both drivers had the same name and the ORACLE_HOME were equal, e.g. OraClient11g_home1.
Now in Oracle 12 or newer this changed by default to OraClient12Home1_32bit and OraClient12Home1
I assume you can simply rename the ODBC driver in registry, i.e.
HKLM\SOFTWARE\WOW6432Node\ODBC\ODBCINST.INI\Oracle in OraClient12Home1_32bit rename key to Oracle in OraClient12Home
HKLM\SOFTWARE\WOW6432Node\ODBC\ODBCINST.INI\ODBC Drivers\Oracle in OraClient12Home1_32bit rename to Oracle in OraClient12Home1
As far as I know when you add a "User DSN" then the DSN is platform independent, i.e. tries to load the 32/64 bit driver depending on the invoking process. Thus, if you add the same DSN again, it will overwrite the existing one. In order to determine the platform you have to add a "System DSN".
This answer may help you for installation: BadImageFormatException. This will occur when running in 64 bit mode with the 32 bit Oracle client components installed
Related
I have developed an app in VC++ to make connect to Oracle DB and access its data. It requires a DSN to be created and some environment variables like PATH, ORACLE_HOME, TNS_ADMIN, etc. to be set which I have done programmatically in my VC++ code. I have updated required registry entries. I have installed 32bit Oracle Instant Client on my machine.
http://download.oracle.com/otn/nt/instantclient/121020/instantclient-basic-nt-12.1.0.2.0.zip
http://download.oracle.com/otn/nt/instantclient/121020/instantclient-odbc-nt-12.1.0.2.0.zip
I have complied and built the application exe using Win32 option as target platform on Windows 7 64 bit machine. This exe works fine on Windows 7 64 bit machine and I am able to make the DB connection successfully using SQLDriverConnect().
But when I do same setup on Windows 32 bit machine like installing 32bit Oracle Instant Client, setting some environment variables like PATH, ORACLE_HOME, TNS_ADMIN, etc., updating required registry entries and try running same application exe (used on 64 bit machine), this gives following error:
[Microsoft] - [ODBC Driver Manager] Data source name not found and no default driver specified.
Please suggest the resolution steps.
Where did you define your ODBC data sources? You have to do this separately
for 64-bit use %SYSTEMROOT%\system32\odbcad32.exe (typically c:\windows\system32\odbcad32.exe)
and for 32-bit use %SYSTEMROOT%\SysWOW64\odbcad32.exe (typically c:\Windows\SysWOW64\odbcad32.exe)
Thanks all for your response.
Anyways I have fixed the issue.
As I mentioned earlier that I am creating DSN and updating registry entries for DSN programmatically, registry path should be different for 64 bit machine and different for 32 bit machine.
On 64 bit machine, DSN registry path would be:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI]
On 32 bit machine, DSN registry path would be:
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI]
This resolved my issue after making DSN registry entries at new path in registry for 32 bit machine.
while creating DNS for my oracle 10g XE. when i click add button in user dns i did not find any option(there is only one option sqlserver)can some one please help for this.(am using windows 7 64-bit)
I suspect you have installed 32-bit Oracle drivers. If this is the case, you need to use the 32-bit version of the ODBC Data Source Administrator. This software is hidden under the SysWow64 folder, eg.
%SystemRoot%\SysWow64\odbcad32.exe
On a 64-bit Windows 7 machine, the Data Sources (ODBC) application points to the 64-bit version (%SystemRoot%\System32\odbcad32.exe).
I'm new to informatica, I have installed informatica 9.5.1 htfix2 on my lappy with
config: Win 7 64 bit os, Oracle 11g,Informatica 9.5.1 htfix2.
After all successfull configurations when i started workflow manager to import tables from Oracle DB i have faced below error "[microsoft odbc driver manager] the specified dsn contains an architecture mismatch between driver and application"
can anyone help me to resolve this issue.
I bet you are using the 64 bit ODBC driver. Remove the DSN from 64 bit and add it in the 32-bit (odbcad32.exe).
Source
I have found the solution after working for seven to eight hours. I feel dumb at its simplicity :p.
Go to Control Panel > Administrative Tools
Open ODBC Data Sources (32-bit). In Users DSN add Data Direct 6.1 Oracle Wire Protocol.
Enter the respective details. E.g. if you are installing on your own system:
Host: localhost
Port: 1521
Service: XE (For Oracle or dependent on database)
Click OK and you are good to access tables on 64 bit Oracle through Informatica designer (32 Bit).
I removed the DSN
I uninstalled Oracle client and reinstalled it clean and perfect.
Recreated the DSN and tested it.
It started working.
I want to connect an ASP application with my Oracle database, and i've readed that I have to set up a connection with my Oracle DB with ODBC driver to achieve it.
The problem is, that when I create the new ODBC connection, it asks for the TNSNames, and my the connection that I have in my TNSNames.ora doesn't appear in the drop list (it appears empty).
Im trying to create the connection going to the ODBC configuration in Control Panel.
Someone has any idea on how can I solve this?
Thanks in advance,
Khor
Okay, I finally solved it.
What worked was creating a windows enviroment variable called TNS_ADMIN with the path to my admin folder on the oracle directory.
TNS_ADMIN: "C:\oracle\product\10.2.0\client_2\network\admin"
That solved the problem.
You probably use Win64.
If yes then you must configure ODBC DSN in the same Windows subsystem as Oracle. Check if you installed Oracle client in 32 or 64 bit version.
There are 2 version of odbcad32.exe in 64 bit versions of Windows. In c:\windows\system32 you will find 64 bit that configure ODBC for 64 bit applications and will use setting from 64 bit version of Oracle client. In c:\windows\syswow64 there is 32 bit version you should use to configure ODBC for 32 bit programs including 32 bit version of Oracle client.
I have a Win32 application that makes ODBC-Connections. We connect using SQLDriverConnect()
which displays a dialog to select the data source. In the x64-Version the Dialog shows and offers 2 different 32 Bit MS ACCESS Drivers. When i select one of these, in the 32 Bit version i would see a open file dialog to select a .mdb file. In the 64 Bit version the call to SQLDriverConnect() at this point returns with -1.
SQLError() returns: "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
Is it in general possible to use a 32 Bit ODBC Driver from a 64-Bit executable? Why are these driver shown? As far as i can find there is no 64 Bit MS Access OBDC driver so far. What can i do?
You absolutely cannot mix 32bit application and 64bit driver (or vice-versa).
Basically, an ODBC driver is, typically, a dll (windows) or a shared object (linux...) which is loaded by its parent application.
All executables, dlls, etc that share the same process space must be the same bit'ness...
In order to "bridge" from a 64bit application to a 32bit ODBC driver you would need to employ an ODBC to ODBC Bridge such as -
http://uda.openlinksw.com/odbc-odbc-mt/
This has a 64bit ODBC client component which connects vis sockets to 32bit server components. The server components bridge to a pre-configured 32bit Access ODBC DSN.
Client component can be either on the local machine or a server machine...
Well, I don't know why SQLDriverConnect() works the way you describe it, but perhaps this Blog post from Microsoft
http://blogs.msdn.com/b/psssql/archive/2010/01/21/how-to-get-a-x64-version-of-jet.aspx
can help you a little bit.
Seems there will be no native 64 bit ODBC driver for MS Access in near future, but those ACE components mentioned there may be an alternative.
You can't, but you have the alternative to compile your app in 32bits, and use the 32bit odbc driver. In my case, I use GoLang just change GOARCH environment variable SET GOARCH=386 then compile your project go build and your all set.