Can't initialize OCI error

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cliffchan512
Posts: 20
Joined: Fri 01 Jun 2012 11:34

Can't initialize OCI error

Post by cliffchan512 » Tue 14 Jun 2016 02:13

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Can't initialize OCI error

Post by AlexP » Tue 14 Jun 2016 12:41

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 .

cliffchan512
Posts: 20
Joined: Fri 01 Jun 2012 11:34

Re: Can't initialize OCI error

Post by cliffchan512 » Wed 15 Jun 2016 02:13

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Can't initialize OCI error

Post by AlexP » Wed 15 Jun 2016 08:38

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.

cliffchan512
Posts: 20
Joined: Fri 01 Jun 2012 11:34

Re: Can't initialize OCI error

Post by cliffchan512 » Fri 17 Jun 2016 04:02

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Can't initialize OCI error

Post by AlexP » Mon 20 Jun 2016 09:03

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.

Post Reply