Is it possible to switch OCI dll version at runtime ?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
egg
Posts: 1
Joined: Thu 07 Nov 2019 16:46

Is it possible to switch OCI dll version at runtime ?

Post by egg » Fri 08 Nov 2019 07:52

Hello,

Using the Oracle Instant client, I have tried to load both 10.2 and 19 OCI dlls during the same process execution, but it fails with << EOCIInitError with message 'Can't initialize OCI. Error -1' >>

When loading just 10.2 or just 19, it works, but when attempting to load both in the same process, even sequentially, closing and freeing all classes related to the 10.2, then calling "OracleHomes.Release" before attempting to access 19, the error occurs.

Is there a way to use different Instant client versions in the same process execution sequentially ?
(and/or better would be a way to load them simultaneously, if possible)

The usage case is access to different Oracle servers, and dance around the client interoperability matrix...

FWIW 10.2 and 11.2 can be loaded sequentially (but not simultaneously).

Thanks!

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Is it possible to switch OCI dll version at runtime ?

Post by MaximG » Wed 13 Nov 2019 17:32

Indeed, when using multiple Oracle Instant Clients simultaneously, the 'Can't initialize OCI. Error -1' error occurs if you try to use any client other than the first one. We assume that it's a limitation imposed by the Oracle Instant Client itself, and we're not able to bypass it at the moment. To solve the defined task, please use a regular Oracle Client.

Post Reply