ODAC and 11g R2 Client

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
polsol
Posts: 71
Joined: Sun 20 May 2007 13:29
Contact:

ODAC and 11g R2 Client

Post by polsol » Fri 22 Oct 2010 17:13

I have Oracle 10g XE running on a win 7 64 bit box. Initially, using Ora Studio I got errors trying to connect so I downloaded and installed 11gR2 client, set Oracle_Home to the 11gR2 client and TNS_Admin to the XE path as usual.
Now Ora STudio finds the right OCI.DLL and loads the TNSNAMES.ORA as usual.
No problems.
However, running ODAC 6.90.0.59 (or Unidac 3.00.0.10) I get the choice of 'XE' or 'Default' as home (Server = XE)
I get (using XE as 'Home'):
'Cannot initialasie OCI Error -1'
OCI: Version -2.1992902633.1633912.2024.1633976
DLL: C:\oraclexe\app\oracle\product\10.2.0\server\BIN\oci.dll
Home [XE]: C:\oraclexe\app\oracle\product\10.2.0\server
Current Home: C:\oraclexe\app\oracle\product\10.2.0\server
Call style:
Oracle:

For Home = Default:
'Cannot Load OCI.DLL'
OCI: Version 11.2.0.1.0 Production (not loaded)
DLL: oci.dll
Home [XE]: C:\oraclexe\app\oracle\product\10.2.0\server
Current Home:
Call style:
Oracle:

Strange that Ora studio (255.167) works OK but not ODAC
Ora Studio has Home as '.Default(OraClient 11g_Home1)' and not just as 'default'
I assume maybe ODAC doesn't use the ORACLE_HOME environment variable to find the client?

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

Post by AlexP » Mon 25 Oct 2010 08:06

Hello,

Please specify the version of Oracle client and Server: x64 or x32
ODAC can't work with the x64 Oracle client version.
ODAC looks for the ORACLE_HOME variable only in the registry, please check your registry to find out if the HKLM\SOFTWARE\ORACLE\*OraClient11*\ORACLE_HOME variable exists.

polsol
Posts: 71
Joined: Sun 20 May 2007 13:29
Contact:

Post by polsol » Mon 25 Oct 2010 14:12

Hi ALex,

PC is running Windows 64 bit Prof.
Oracle XE (32 bit) installed in C:\Oraclexe.
Client installed under C:\Oraclexe\Client on same machine.
Oracle_Home in registry is "C:\Oraclexe\Client"
Oracle_Home_Name in registry is "Oraclient11g_Home1"
OCI.DLL under this directory is Version 11.2.01

OraDeveloper Studio V 2.55.167 refused to work until I installed 11g Client (mesage was something like I must use OCI 64 bit).
Which is why I installed the Oracle CLient (as above), Oradeveloper Studio now works OK. "Oraclient11g_home1" appears in the choices for
Database Connection Properties, General, Home.

However, ODAC (6.90.059) doesn't work with the same conditions.
I also have Unidac (3.00.0.10) installed which I have been trying today. Same problem as ODAC "Can't find OCI.DLL".
Tried setting the 'HomeName' under Uniconnection options to:
1) Oracle_Home
2) Explicitly to C:\Oraclexe\Client
But get either "Cannot find OCI.DLL in Oracle_Home"
or
"Cannot find OCI.DLL in C:\Oraclexe\Client"

I understand from your comments that ODAC doesn't work with the 64 bit OCI.DLL but can't understand why OraDeveloperStudio does. :roll:
If ODAC/Unidac don't work with the 64 bit OCI.DLL, are there plans on implementing this?

BTW, Oracle should really 'roll out' a 64 Bit XE and then things would probably be OK. 11gR2 is certified to run on Win 7 - but onli if you have the service pack - for which you have to be a registered user :evil:

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

Post by AlexP » Tue 26 Oct 2010 08:28

Hello,

OraDeveloper Studio is a .Net application built on MS Visual Studio, which supports building of x64 application, so OraDeveloper Studio can work with x64 dll modules.
DAC is built on Delphi, now Delphi doesn't support building x64 applications, so we also can't support it. ODAC requires the x32 Oracle client to work correctly.

polsol
Posts: 71
Joined: Sun 20 May 2007 13:29
Contact:

Post by polsol » Tue 26 Oct 2010 09:54

Alex,

Thanks for clearing that up!
Actually should have realised this myself :oops:

Will just have to wait for Delphi to get up to date then.

riwe
Posts: 9
Joined: Fri 20 Nov 2009 14:57

Post by riwe » Wed 03 Nov 2010 15:19

I had the same problem. I have installed the oracle 11g w32 client. My solution is to connect the Oradeveloper studio via direct connection and the application (with ODAC) via the oci.dll. This configuration works.

polsol
Posts: 71
Joined: Sun 20 May 2007 13:29
Contact:

Post by polsol » Sun 07 Nov 2010 14:11

Riew,

Thanks for the tip. Have tried this but get an Ora-12154 (could not resolve service name error) when trying to connect via TNSNAMES.ORA.
Same with Unidac.
Orastudio in Direct mode works (as does ODAC/UNIDAC).

I see from the Oracle Forums that having the application installed under "C:\Program Files (x86)" seems to be the issue and the app (Delphi 2007 in this case) has to be installed in a different directory for the system to work - unless you have another solution?

"TNSPING" and "LSNRCTL stat" otherwise indicate that XE is up and running.

polsol
Posts: 71
Joined: Sun 20 May 2007 13:29
Contact:

Post by polsol » Sun 07 Nov 2010 14:20

BTW, Oracle 10XE is installed under C:\Oraclexe and not under Program Files(X86).

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

Post by AlexP » Mon 15 Nov 2010 10:14

Hello,

Please set/create the TNS_ADMIN enviroment variable to the path to your tnsnames.ora file and try again

polsol
Posts: 71
Joined: Sun 20 May 2007 13:29
Contact:

Post by polsol » Mon 15 Nov 2010 15:03

Thanks Alex,

Unfortunately it didn't work :-(

Still get Ora-12154

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

Post by AlexP » Wed 01 Dec 2010 11:40

Hello,

This problem arises only in Windows 7 with Oracle XE client.
We are trying to resolve the problem.
We will notify you as soon as we have any results.

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

Post by AlexP » Fri 03 Dec 2010 11:52

Hello,

The problem is connected with the Oracle XE client behavior. If the application that tries to connect to Oracle is located in a folder the name of which contains brackets ( '(' or ')' ), then client cannot resolve the connection identifier.
To resolve the problemyou should move your application to the folder without brackets, and to be able to connect in design-time you should reinstall the IDE to a folder without brackets as well.

Post Reply