Unable to Create ORACLE-ODBC DSN on Window 7 64 bit using SysWow64/odbcad32.exe - excel

I am trying to create a DSN but I can't do it. The processes I am applying these are as follows:
1. Oracle 12c (64bit) Installed in Remote PC
2. Using Oracle 12c Client on Windows 7 64 bit
3. Trying to Create DSN from Syswow64/odbcad32.exe becuase I want to use this DSN from my Excel 2013 VBA program and the office is 32 bit.
3. After pressing the Add button on the Microsoft ODBC Administrator from Syswow64/odbcad32.exe, I don't find the
Oracle In OracleClient12Home2 in the driver list.
Please suggest me what should I do in this regard.

I have solved this. Basically due to security reason, my registry was not configured properly at the time of installation. I have removed my previous installation and Set new ORACLE_HOME and run install As Run As Administrator. After that the problem is solved.

Related

Power Query and the Oracle Ora-12154 error

I can connect to the client's Oracle database using the full connection string in Power Pivot. However, I need to connect in Power Query which throws an error when attempting to use the full connection string because it exceeds the 128-character limit. So I attempted to use EZConnect and a TNS name in Power Query but both generate an ORA-12154 error message. I get the same error message when I attempt to use EZConnect or a TNS name in Power Pivot. a duplicate of the TNSnames.ora file is read successfully on at least one other machine on the same network.
The exact error message is:
"Unable to connect. We encountered an error while trying to connect. Details: 'Oracle: ORA-12154: TNS could not resolve the connect identifier specified"
.
SYSTEM DETAILS
OS
Windows 7 Enterprise 64-bit machine
Applications
Microsoft Excel 2013 32 bit
Oracle 11gR202 Client 32 bit
(from the client's approved installs site, i.e. not the version available from Oracle downloads)
Oracle 11gR202 Client 64 bit
(from the client's approved installs site, i.e. not the version available from Oracle downloads)
OraDB11g_home1
(this was the original installation from the oracle downloads site. during the installation process, the installer displayed many "file not found error messages," i assumed this meant that this version lacks a flag which marks it as approved for the client's system. so i installed the client approved versions above which resulted in being able to connect via Power Pivot using the full connection string).
instantclient_12_1 (C:\Program Files\instantclient_12_1)
Configurations
TNS_ADMIN
- System and User Variable(identical copies of a TNSnames.ora file is in both locations):
C:\oracle\network\admin;
C:\app\nd369d\product\11.2.0\dbhome_1\NETWORK\ADMIN
PATH
- System variable:
C:\Oracle\11gR202Client64bit\bin\;
C:\Oracle\11gR202Client32bit\bin\;
C:\ProgramData\Oracle\Java\javapath;
C:\Program Files\instantclient_12_1;
C:\app\nd369d\product\11.2.0\dbhome_1\BIN;
C:\oracle
JAVA
(i updated to Java 8 update 66 from the client's installs site. while the procedure installed the update, it didn't remove the earlier version so now both are present on the machine):
Java 7 Update 51 (64 bit)
Java 7 Update 51
Java 8 Update 66 (64 bit)
Java 8 Update 66
You're having multiple oracle clients installed, and very likely they have different tnsnames.ora and sqlnet.ora variants.
See also this: http://www.orafaq.com/forum/t/74793/
check if sql*plus works from the command line with a tns name
check your tnsnames.ora config file, I found it is quite error prone with those many parenthesis :)

Connecting to 32 bit Oracle client with 64 bit Excel

I'm trying to connect my Excel to Oracle with this connection string in VBA:
dim cn As New ADODB.Connection
cn.Open "Provider=OraOLEDB.Oracle;Data Source=source;User Id=userid;Password=pwd;"
I'm getting this error:
Run-time error '3706':
Provider cannot be found. It may not be properly installed.
Relevant references:
Microsoft ActiveX Data Objects 6.1 Library
OraOLEDB 1.0 Type Library
Excel is MS Office Professional Plus 2010 64-bit
Windows is 7 Enterprise, service pack 1, 64 bit
Oracle client is 11.2.0 32 bit (I think)
Oracle server is Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Now... I have scoured the net and cannot figure out what the issue is, but my best guess is there's some 32 bit vs 64 bit conflict with drivers I'm using. I'm trying to get a sense of what path I should be taking before I involve my company's IT department to try installing stuff for me. Does the Oracle client have to be 64 bit if MS Office is? Or do I just need the 64 bit Oracle Data Access Components? I've tried a bunch of different connection strings with no success, including using MSDAORA instead of OraOLEDB.Oracle...
Yes, when you use 64-bit Excel you must install also 64-bit Oracle Client and 64-bit OLE DB Provider.
OLE DB Provider from Microsoft (i.e. MSDAORA) does not exist for 64-bit. It exists only for 32-bit and has been deprecated for very long time already.
I don't know whether you need your 32-bit Oracle Client for something else, so maybe you cannot simply remove it from your PC. Here is an instruction how to install both 32-bit and 64-bit Oracle Client on one machine.
Install Oracle Client x86 and x64
I too had the same issue and the solution is to set the oracle drivers for the excel session to 32 Bit drivers and initiate the excel.
I use the following Bat file to open the excel and it connects to oracle without any issues:
#
Set Temp=C:\Temp
Set TMP=C:\Temp
Set Oracle_Home= #YourDriveLetterhere - >M:\ORA12C\product\12.1.0\client_1
Set Path=C:\Windows;C:\Windows\System32;M:\ORA12C\product\12.1.0\client_1\bin;M:\ORA12C\product\12.1.0\client_1\nls\mesg;M:\ORA12C\product\12.1.0\client_1\network\admin;
START "" "C:\MacroFileNameWhichConnectsToOracle.xlsm"
#
The oracle server matters not.
Try opening a dos window and type c:\ tnsping yourservername
look towards installation issues.

Connect from Excel 2007 to Oracle via ODBC (Windows7 x64)

I have a Windows 7 64 bit and Excel 2007 32 bit.
I need to connect with Oracle DB by ODBC.
How can i create the above connection?
I installed 32bit client:
instantclient-basic-nt-12.1.0.2.0 and
instantclient-odbc-nt-12.1.0.2.0,
I created necessary environment paths (PATH, ORACLE_HOME, TNS_ADMIN) and I add ORACLE_HOME to variable PATH in system path.
When I'm trying to create DSN in C:\Windows\SysWOW64\odbcad32.exe I'm getting an error nr 126: system can not find a file SQORAS32.dll in %ORACLE_HOME%...
Any ideas?
I created ODBC connection!
The problem with error nr 126 still appears when I'm trying to create connection using driver "Oracle in instalclient_12_1", but when I'm using driver "Microsoft ODBC for Oracle" it works ok.

SSIS and 64bit excel

I have researched this thoroughly but I've yet to find a satisfactory answer.
I am using SQL Server Data Tools 2010 and Microsoft Office 2013 64-bit. I know that there is a compatibility problem and I am trying to solve it because I know for a fact that you can use an .xlsx file as a data source in a Data Flow.
First I tried setting Run64BitRuntime to False in Project -> Properties -> Configuration Properties - > Debugging but it didn't work
Whenever I try importing an .xlsx file I get the same error
Microsoft Visual Studio
------------------------------
Could not retrieve the table information for the connection manager
'Source Path'. Failed to connect to the source using the connection
manager 'Source Path'
------------------------------
So I tried downloading the "Microsoft Access database engine 2010" as so many suggested. The 64-bit installed successfully but the 32-bit returned the following error
You cannot install the 32-bit version of Microsoft Access database engine 2010
because you currently have 64-bit Office products installed.
Now I know I am missing a step here cause while I can see "Microsoft Access database engine 2010" in the list of installed programs in control panel it does not show up as an option in the Provider list when I am trying to create a new Connection Manager.
So before I result following the instruction on this blog I would like to ensure there is no easier way of solving the problem
Thank you in advance for you time.
If you're machine is x64, forget about Excel, as there is no driver available.
Just convert the file to CSV and use a Flat File Connector instead.
Ok, the answer was so ridiculously easy that I kind of feel ashamed for this post now.
If you are using Microsoft Office 2013 64-bit and want to work with SSIS you have to download and install the 32-bit Microsoft Access Database Engine 2010 Redistributable, not the 64-bit, set Run64BitRuntime to False and everything will work like a charm.

attempt to load oracle client libraries threw badimageformatexception

I am using Visual Studio 2012. I installed Oracle 64bit Client. My Operating system is Win7 64 bit. I want add a new Oracle DB connection but when I enter username password etc. and click 'Test Connection' button, I see this error:
attempt to load oracle client libraries threw badimageformatexception
This problem will occur when running in 64 bit mode with the 32 bit
Oracle client components installed.
But my Oracle Client is 64 bit. There is no any 32 bit component on my system.
I am also having problem on Oracle.DataAccess.dll added to my references. I tried EVERY COMBINATION which is Any CPU, x86i x64 platforms but nothing has changed. Everytime I get BadImageFormatException.
I searched for another questions but nothing has changed. I also tried IIS App Pool Enable 32bit applications property to True but it doesnt work.
Any suggestions? What else I can try?

Resources