Oracle Instant Client - 64b

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Daril
Posts: 27
Joined: Fri 07 Oct 2011 09:58

Oracle Instant Client - 64b

Post by Daril » Tue 17 Jun 2014 07:55

Hi,
I have a trouble with connect during 64b Instant Client (Direct=false). My scenario is
1) I Copy Instant Client 64b to "C:\InstantClient"
2) I create subfolder network\admin and file tnsnames.ora
3) I modify windows path variable and to begin insert "C:\InstantClient\;"
When I try connect I obtain message "Cannot load oci.dll from C:\InstantClient"

What is strange: When I try insert key ORACLE_HOME, and ORACLE_HOME_NAME to registry it is work. When I try 32b Instant Client it is work without registry record(and with registry records too).

Maybe Unidac don't know that oci.dll is 64b and try load it as 32b dll.

Version of Unidac 5.1.4. for RAD XE2, OS Windows 7 64b, homeName is empty

Thank you
Daril

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

Re: Oracle Instant Client - 64b

Post by AlexP » Tue 17 Jun 2014 10:34

Hello,

Such behavior can be a consequence of that in addition to Instant Client (specified in the PATH environmental variable) you have other 32-bit Oracle clients registered in the registry and set as default clients.

Daril
Posts: 27
Joined: Fri 07 Oct 2011 09:58

Re: Oracle Instant Client - 64b

Post by Daril » Tue 17 Jun 2014 11:00

Thank you Alex for quick response.

Unfortunately this is not the case. I tried Clear virtual machine where is only one 64b Instant Client.

Daril

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

Re: Oracle Instant Client - 64b

Post by AlexP » Wed 18 Jun 2014 11:49

Make sure you have installed 64-bit platform in your project.

Daril
Posts: 27
Joined: Fri 07 Oct 2011 09:58

Re: Oracle Instant Client - 64b

Post by Daril » Wed 18 Jun 2014 12:52

Thank you for response

Yes I have 64b platform in Delphi project.
When I insert registry records with ORACLE_HOME, everything work fine.

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

Re: Oracle Instant Client - 64b

Post by AlexP » Thu 19 Jun 2014 10:14

We cannot reproduce the problem. Please make sure the standard GetEnvironmentVariable API method returns the correct string in the x64 application.

Daril
Posts: 27
Joined: Fri 07 Oct 2011 09:58

Re: Oracle Instant Client - 64b

Post by Daril » Thu 26 Jun 2014 10:39

Which Environment Variable do you mean? PATH?

Step to reproduce:
1) Clear Windows 7 virtual machine
2) Copy Instant Client 64b to C:\InstantClient64\ (Client Shared Library 64-bit - 11.2.0.3.0)
3) Set Windows Path variable to oci.dll
4) Create C:\InstantClient64\Network\Admin folder and create there tnsnames.ORA
5) Set TUniConnection.Direct =false
TUniConnection.Server=OSTORACLE10G_64 (This is my record)
TUniConnection.User=scott
TUniConnection.Password=*****
UniConnection.SpecificOptions=Oracle.UseUnicode=true
Oracle.HomeName=C:\InstantClient64\
Oracle.ConnectMode=cmNormal
6) Try Connect = Failed (Cannot find OCI.dll in "C:\InstantClient64\")

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

Re: Oracle Instant Client - 64b

Post by AlexP » Tue 01 Jul 2014 10:54

The HomeName property is designed for specifying client name registered in the registry, and it is used when you have several registered clients and you don't want to use the default one. In your case, there is no need to set this propуrty.

Post Reply