Errors with Oracle Client "Attempt to load Oracle client libraries threw BadImageFormatException"
Posted on 2018-03-13
We have a server and runs some tests for us using Oracle. I unfortunately installed the 12c 32bit Oracle client, but we really want the 12c 64bit client. I followed some online instructions to remove the 12c 32bit client, which seemed to work. I then installed the 64bit client and it seemed to be working, but when I run these tests, the tests all fail and they bring up the error below:
System.InvalidOperationException : 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. ---- System.BadImageFormatException : An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
I decided to follow an article that mentions I could install both clients and then have a symbolic link between both clients so that it wouldn't matter what bit test I run, it would either use the 32bit or 64bit libraries, depending on the test. So I reinstalled the 32bit client under a different home directory. Of course this didn't work and I'm stuck. I really don't want to have to uninstall anything so is there a way to fix this issue? I also don't want to have to reinstall Windows just to fix this when the server is working fine otherwise.
Thanks in advance!