Page 1 of 1

Can't initialize OCI error

Posted: Tue 14 Jun 2016 02:13
by cliffchan512
Hi,

I connected with 12c and worked as normal, then saved this session before closing it.
Then I made the 12c instant client invalid (i.e remove all 12c client files except oci.dll), when I reopened the session and connected with 12c, i got the oci error which is expected.
However, I switched to use 11g instant client and still had the same error encountered. I expect i can connect with 11g client successfully. If I connect with other oracle admin client, it works.

Please advise.

Re: Can't initialize OCI error

Posted: Tue 14 Jun 2016 12:41
by AlexP
Hello,

The detailed description about deployment and configuration of Instant Client can be found on the developers' website or on our blog: http://blog.devart.com/how-to-configure ... lient.html .

Re: Can't initialize OCI error

Posted: Wed 15 Jun 2016 02:13
by cliffchan512
Hi,

The 11g instant client can be connected successfully if i make a connection on the first time logon. Just failed if connected with invalid 12c first then 11g.

Thanks.

Re: Can't initialize OCI error

Posted: Wed 15 Jun 2016 08:38
by AlexP
We haven't tested ODAC with such modifications in Oracle Client and can't tell the reasons for such behavior. You can download the full Instant Client from the Oracle website. You can also use Direct Mode that doesn't require any clients.

Re: Can't initialize OCI error

Posted: Fri 17 Jun 2016 04:02
by cliffchan512
Hi,

I tried the direct mode with invalid 12c instant client and also got the same error, then switched to use 11g instant client and still failed to connect. Then I tried to debug and traced into the source code and found that there is a variable FDefault which was initialized with values 12c home in the procedure TOracleHomes.Init() when failed to connect with 12c. So the next connection with 11g still failed as the FDefault was 12c values.

Please advise.

Re: Can't initialize OCI error

Posted: Mon 20 Jun 2016 09:03
by AlexP
The direct mode does not use the Oracle client libraries and cannot cause this error. To activate this mode, you need to set the Direct property to True:

Code: Select all

OraSession.Options.Direct: = true;
If you have multiple clients installed, ODAC will use the first client found. If you want to change the client, you need to specify its name in the OraSession.HomeName property.