Can't connect Excel to Oracle although I already installed the drivers. (Using Excel's PowerQuery) - excel

I have been trying for a while now, to connect Excel to Oracle through PowerPivot, but unfortunately to no success.
I am currently getting this error: An error happened while reading data from the provider. '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.'.
I have so far done the following:
1. Installed Oracle Client x64
I installed Oracle Client x64 from https://www.oracle.com/database/technologies/112010-win64soft.html. I used file win64_11gR2_client.zip. In the installation proccess I went for the option InstantClient
2. Installed Oracle's ODBC Instant Client x64
I went to https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html and downloaded both instantclient-basic-windows.x64-19.6.0.0.0dbru.zip and instantclient-odbc-windows.x64-19.6.0.0.0dbru.zip. I 'installed' them by unziping them in the same folder, and running odbc_install.
Then, I added the directory to my path environment variables and then created a new one called TNS_ADMIN and added the same directory.
3. Installed Oracle's ODBC Instant Client x32
Finally I did the same for the x32 files, but I did not add that directory to my environment variables.
I validated the correct installation by finding the drivers here:
x64 Drivers:
x32 Drivers:
Help in Troubleshooting
It is frustrating that besides the error message I can't find any way to troubleshoot this issue. Any ideas on what could it be? Any ideas on how to troubleshoot?
Thanks!

With 32 bit Oracle Instant client
Option 1 with ODBC drivers
Option 2 without ODBC drivers and ODAC client
Option 1: After installing 32 bit odbc drivers try to add only 32 bit instant client to path or if you add both clients to system path make sure 32 bit client is above 64 bit client
If the order is set correctly in system path you can verify from command prompt with where command
C:\WINDOWS\system32>where sqlplus
D:\instantclient_19_6_x86\sqlplus.exe
D:\instantclient_19_6_x64\sqlplus.exe
or with command path
C:\WINDOWS\system32>path
PATH=D:\instantclient_19_6_x86;D:\instantclient_19_6_x64;xxxxx
If set correctly You can connect via odbc File--->From Other Sources --> From ODBC
Option 2: Enables you to connect to database via ODAC Client without ODBC driversFile--->From Database --> From Oracle Database
Download ODAC 32 bit from Oracle ODP.NET_Managed_ODAC122cR1.zip.
Unzip the folder and from elevated command prompt install
D:\ODP.NET_Managed_ODAC122cR1>install_odpm.bat D:\instantclient_19_6_x86 x86 true
Here I set target directory to 32 bit instant client i.e D:\instantclient_19_6_x86
Edit: Add tns name entry in tnsnames.ora and tns_admin system variable
i,e TNS_ADMIN= D:\instantclient_19_6_x86\network\admin

Related

How to use 32bit and 64bit Oracle instant client in parallel [duplicate]

I have 64-bit Oracle Database Server (11.2.0.3) installed on Windows 2008 R2, and naturally, it automatically installs the 64-bit client. I have to install an application onto this server that is 32-bit and requires the 32-bit Oracle client. (Don't Ask - I can't install the 64-bit version of this app, it won't work with the 64-bit client, and I can't install it on another server.)
Now i have tried installing the 32-bit Client into a different physical folder and selected a different value for the Oracle Base and Software Location when installing and it installed just fine. And it put the BIN folder of the 32-bit Client installation at the head of the PATH statemtn.
However, when i tried to run "SQLplus system/system" with the 32-bit version it gives me the "ORA-12560: TNS:protocol adapter error". When I go into the folder with the 64-bit sqlplus.exe and ran it (directly and not through PATH), the "system/system" credentials worked fine.
I copied the TNSNames folder from the Oracle Server's NETWORK/admin folder to the Oracle Client's NETWORK/admin folder, and rebooted the server. Same results.
This is the extent of my troubleshooting knowledge for Oracle.
How can i get the 32-bit Client to run on the same server as the 64-bit Oracle Server?
I know in linux/Unix, you simply put in the lib32 folder into the the 64-bit client folder and set a couple of environment variables, but i'm pretty sure it's not that simple in Windows.
If there is a way to do this, please be descriptive in you answer as I will need step-by-step instructions.
Thanks in advance.
Here is an instruction how to install 32-bit and 64-bit Oracle Client on one machine. Follow the instruction, then it should work.
Assumptions: Oracle Home is called OraClient11g_home1, Client Version is 11gR2
Download and install Oracle x86 Client, for example into C:\Oracle\11.2\Client_x86
Download and install Oracle x64 Client into different folder, for example to C:\Oracle\11.2\Client_x64
Open command line tool, go to folder %WINDIR%\System32, typically C:\Windows\System32 and create a symbolic link ora112 to folder C:\Oracle\11.2\Client_x64 (see commands section below)
Change to folder %WINDIR%\SysWOW64, typically C:\Windows\SysWOW64 and create a symbolic link ora112 to folder C:\Oracle\11.2\Client_x86, (see below)
Modify the PATH environment variable, replace all entries like C:\Oracle\11.2\Client_x86 and C:\Oracle\11.2\Client_x64 by C:\Windows\System32\ora112, respective their \bin subfolder. Note: C:\Windows\SysWOW64\ora112 must not be in PATH environment.
If needed set your ORACLE_HOME environment variable to C:\Windows\System32\ora112
Open your Registry Editor. Set Registry value HKLM\Software\ORACLE\KEY_OraClient11g_home1\ORACLE_HOME to C:\Windows\System32\ora112. Using C:\Oracle\11.2\Client_x64 should also work.
Set Registry value HKLM\Software\Wow6432Node\ORACLE\KEY_OraClient11g_home1\ORACLE_HOME to C:\Windows\System32\ora112 (not C:\Windows\SysWOW64\ora112). Using C:\Oracle\11.2\Client_x86 should also work.
You are done! Now you can use x86 and x64 Oracle client seamless together, i.e. an x86 application will load the x86 libraries, an x64 application loads the x64 libraries without any further modification on your system.
Probably it is a smart idea to set your TNS_ADMIN environment variable (resp. TNS_ADMIN entries in Registry) to a common location, for example TNS_ADMIN=C:\Oracle\Common\network\admin
Commands to create symbolic links:
cd C:\Windows\System32
mklink /d ora112 C:\Oracle\11.2\Client_x64
cd C:\Windows\SysWOW64
mklink /d ora112 C:\Oracle\11.2\Client_x86
Notes:
Both symbolic links must have the same name, e.g. ora112.
Despite of their names folder C:\Windows\System32 contains the x64 libraries, whereas C:\Windows\SysWOW64 contains the x86 (32-bit) libraries. Don't get confused.
Background information, why this works: Registry Redirector and File System Redirector
I had the same issue. Both 32 and 64 bit ORA clients installed on same Windows 10 machine (separate folders) and 32 bit apps stopped working. All I had to do was edit the System Environment variables and DELETE the ORACLE_HOME entry, then re-boot. Windows/Oracle do the rest based on the registry entries. Just need to copy the tnsnames.ora to both installations.

running node.js API

I'm currently trying to run node.js API on my system with Oracle client 11g 64-bit installed and node version 6.9.2 64-bit but it throws the below error:
Error: NJS-045: cannot load the oracledb add-on binary for Node.js
6.9.2 (win32, x64) Node.js require() error was: DPI-1047: 64-bit Oracle Client library cannot be loaded:
"E:\app\Administrator\product\11.2.0\client_1\BIN\oci.dll is not the
correct architecture". See https://oracle.github.io/odpi/doc/
installation.html#windows for help
It also prompts to check the availability of 64-bit Oracle client libraries in the PATH environment variable, which I have already validated.
Node-oracledb installation instructions:
https://oracle.github.io/node-oracledb/INSTALL.html You must have
64-bit Oracle client libraries in your PATH environment variable. If
you do not have Oracle Database on this computer, then install the
Instant Client Basic or Basic Light package from
http://www.oracle.com/technetwork/topics/winx64soft-089540.html A
Microsoft Visual Studio Redistributable suitable for your Oracle
client library version must be available.
Also Microsoft Visual C++ Redistribitable 64bit 2012,2013,2015 are also installed.
Need help troubleshooting this problem as I do not know where is the link missing.
Do you have Oracle DB installed in your system?
Is Oracle client libraries installed in your system and added in your PATH environment variable?
Is Microsoft Visual Studio installed in your system?
Please check above dependencies then try again.

How to add Oracle ODBC 64 bit to 32bit Oracle client

Having a question on Oracle. Computer has Oracle 11.2 32bit Client installed(win is 64bit) However, downloaded Office x64 and want to connect to OracleDB.
I have tried to download from Oracle page Oracle Instant Client Basic, inserted into it x64 ODBC Instant Client, made a path in environments to it and launched CMD installation, and got message that it was successfully installed. However, when i launch ODBC Administrator, and try to add System DSN of OraClient , i do not see possible options for 64bit ODBC connection.
Where can be the problem? Oracle client is installed in C:\oracle\product\11.2.0\client_1 and x64 ODBC connection with Instant Client i have put in C:\oracle\instantclient_11_2
Windows has two versions of odbcad32.exe:
The 32-bit version of the odbcad32.exe is located in the %systemdrive%\Windows\SysWoW64.
The 64-bit version of the odbcad32.exe is located in the %systemdrive%\Windows\System32.
To add a 64-bit DSN, you need to start odbcad32.exe from %systemdrive%\Windows\System32.

Can't open lib '/home/user/install/os410042/var/progress/DataDirect/Connect64_for_ODBC_71/lib/ddora27.so' : file not found

We have an application which works with oracle. Our application servers run in the Linux Platforms, and we have database servers running on the Windows machine. We are currently testing the new Progress ODBC driver to connect the Oracle DB from Linux server. So i have installed the DATA DIRECT PROGRESS ORACLE ODBC DRIVER, when i try to connect i got the below error
[unixODBC][Driver Manager]Can't open lib '/home/user/install/os410042/var/progress/DataDirect/Connect64_for_ODBC_71/lib/ddora27.so' : file not found
below is my ODBC.ini entry , and through isql i can able to connect to the Oracle Machine , but only my application is unable to connect.
[ODBC Data Sources]
Oracle Wire Protocol=DataDirect 7.1 Oracle Wire Protocol
ORACLE_TEST_DSN=DataDirect 7.1 Oracle Wire Protocol
[ODBC]
IANAAppCodePage=4
InstallDir=/home/user/install/os410042/var/progress/DataDirect/Connect64_for_ODBC_71
Trace=0
TraceFile=odbctrace.out
TraceDll=/home/user/install/os410042/var/progress/DataDirect/Connect64_for_ODBC_71/lib/ddtrc27.so
[ORACLE_TEST_DSN]
Driver=/home/user/install/os410042/var/progress/DataDirect/Connect64_for_ODBC_71/lib/ddora27.so
Description=DataDirect 7.1 Oracle Wire Protocol For Oracle
AlternateServers=
ApplicationUsingThreads=1
AccountingInfo=
Action=
ApplicationName=
ldd ddora27.so also fine , it doesnt show anything not found.
Run the DataDirect setup script to set variables: Two scripts, odbc.csh and odbc.sh, are installed in the installation directory. For Korn, Bourne, and equivalent shells, execute odbc.sh. For a C shell, execute odbc.csh. After running the setup script, execute the env command to verify that the ODBCHOME/lib directory has been added to your shared library path.
Link to related documentation.
An application restart may be required to pick up the new shared library path. Once the environment is configured, you'll be able to load the drivers.

Installing a oracle forms development machine

After working with Oracle databases and Apex for many years, I want to get some knowledge about Oracle forms & reports, because they are still quite widely used.
I've never seen Oracle forms & reports, so I want to create a development installation for learning purposes. Unfortunately installing Oracle forms seems a bit more tedious than I expected and I'm a bit stuck.
Windows installation
I first tried installing Oracle 12c (from http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html) on windows 7 x64. I installed the "Standalone forms builder", because when I chose "Forms and reports deployment", I got this error:
After installation I tried to start frmbld.exe, but immediately got this error:
FRM-91135: fatal error: message file D:\oracle\client\user123\product\12.1.0\client_1\forms\mesg\fmcus.msb not found
My oracle client is installed in that directory, but the mentioned file is certainty not there.
linux installation
Googling around I did not find any solution for this problem, so i decided to switch to a Linux virtual box machine. I installed Oracle linux x64 and then installed with a download from the same page again.
Once more I could only choose "Standalone forms builder", when I chose "Forms and reports deployment" I got exactly the same error as on windows. The installation ran successful.
After installation I tried to start formbuilder, this time I was presented this error:
./frmbld: error while loading shared libraries: libXm.so.3: cannot open shared object file: No such file or directory
So now I'm a bit stuck. My questions are:
Am I going the right way with the way I'm trying to install Oracle forms? or is there a better / easier way?
Do I need a "Forms and reports deployment" to be able to experiment with Oracle forms? or is the standalone installation the right way to go?
Are there any pre-installed virtual machines available for this? (I googled but couldn't find anything.)
Do I need a running Oracle database to be able to experiment with Oracle forms?
Linux installation:
Yes you are going the correct path installing Forms/Reports. There is no easier install method (Oracle does not have a prebuilt VM with Forms/Reports).
You will require an Oracle database to connect to.
To fix the linux error you will need to install additional OS packages, probably motif - you can run (to find the packages required): yum whatprovides libXm*
I have installed Forms Builder 12c (standalone install) on Fedora and it is working correctly.
The windows error might be related to you OS PATH ENV - if you have any other Oracle products installed, the PATH order may need to be changed, put the Forms related paths at the beginning.
Unfortunately I was unable to get it properly working with my previous attempts. In the end I restarted an installed a windows 10 x64 virtual machine, after which i followed these excellent video's to get everything working: https://www.youtube.com/watch?v=4tgtHPJGc7o

Resources