Can't Initialize OCI.Error -1 when trying to log in to toad

I am receiving the Can't Initialize OCI.Error -1 when trying to log in to toad. I have downloaded the following...

Oracle Instant Client 12.1.0.2 - 64 bit
Microsoft Visual C++ 2010 Redistributable Package
Toad 13.1.0.78 64 bit

Oracle home is pointing to the correct client.

I have a newer version of client as well but it didn't work which is why I went down to version 12.1.0.2.

I've searched toad world and tried some solutions but nothing has worked. I don't see anything related to the version of TOAD I'm using.

Can someone help?

Does this help?

I'm sorry...I don't understand what you're saying in your reply.

Do you have DynaTrace installed?
(I edited my link in my first reply to make it more obvious. Click it for details.)

I do not have Dynatrace installed.

I was thinking that an older version of TOAD would be the way to go but unfortunately I don't have one.

Don't go to an older Toad.

If you have multiple Oracle clients installed but only need one, remove the one(s) that you no longer use.

If you have an ORACLE_HOME environment variable set, make sure that it is correct. (Or just remove it as it is unnecessary...this should be in registry for full clients and not needed otherwise).

Make sure that you have read and execute privileges on the OCI.DLL file in your Oracle client folder.

By the way, Toad 14.0 (due out this week) will include a troubleshooter for this exact problem, because the error message is so vague.

OK yes...I do have multiple versions of client. I will delete the others and keep the latest.

As far as the environment variable set. I have TNS_ADMIN not ORACLE_HOME. Is this an issue?

Also, I'm not sure if I have read and execute on OCI.DLL. I need to check with my DBA.

Keep TNS_ADMIN.

Just right-click on OCI.DLL and check properties, it's in there somewhere. Most likely this is not the problem.

It says read only

O no...i does say read and execute. I was on the wrong tab

I ended up uninstalling the instant client and installing 12.1 64 bit regular client. The TNSnames are correct, i can ping the database, all prereq's passed, and all paths are correct. I chose run as administrator on the toad installer and again when i tried to log in.

But, I still get the can't initialize error. I've yet to see a fix for this. I know you said Toad 14 is releasing soon, but do you have any idea why this is happening?

The problem with Dynatrace happened because that software had a hook into the Windows API CreateFileA procedure. A component of Toad also hooks this procedure, and did not account for the possibility that some other software would be doing that also. Because the "other" software is 64 bit, we could work around this in Toad by installing the 32 bit version.

You said you don't have DynaTrace, but maybe you have some other 64-bit software that also hooks the CreateFileA procedure, and is causing the same problem in Toad. If so, you could work around it by removing your 64 bit Toad and Oracle client, and installing 32 bit Toad and Oracle client.

If that solves it, I'd be interested to know what other software you have installed on your PC.

I don't have a 32 bit version of TOAD. My PC is new because my old PC (which ran Toad just fine) died on me. The only other 64 bit program is carbon black which was just installed as well.

And Java 64 bit

Click the link below and try the steps outlined there to remove all traces of Oracle, reboot, then reinstall:

If the problem persists after that, it is because of a CreateFileA conflict as I described above. Toad software licenses include 32 and 64 bit verisons. You, or whoever bought your license can download the 32 bit version here:
https://support.quest.com/toad-for-oracle/13.3/download-new-releases

Yes finally!

I installed 32 bit everything and still couldn't connect.

It was because the oraaccess.xml file was blank. I only figured that out because I tried to connect to the database from the command prompt. I typed sqlplus at the prompt add got the error that took me to the xml file.

I had to resurrect an old one (which I didn't even realize i had) and copy it to the directory where the 32 bit client lives and BOOM!

Oh wow. That is great information. I have that file too but I've never even noticed it before. Do you know how it became blank?

I'm not sure but there were a few on my system that were blank.

I wonder if it's like tnsnames.ora where once you configure tnsnames in toad the file updates with that info.

Maybe somehow something went off the rails during the install and that xml didn't get loaded...

The only copy of it that I have is in the RDBMS\DEMO folder. I would think it doesn't get used at all in that location. Is yours in the TNS_ADMIN location?

That's where I found it...in the same folder