Cannot find OCI dll.
-
- Posts: 20
- Joined: Fri 01 Jun 2012 11:34
Cannot find OCI dll.
Hi,
Starting from version 9.2.5 to latest version 9.3.9, I encountered an issue which is error 'cannot find OCI dll' when connecting with Oracle instant clients. Prior to version 9.2.5, connection is ok with instant clients in my working environment. Please advice.
Thanks,
Cliff
Starting from version 9.2.5 to latest version 9.3.9, I encountered an issue which is error 'cannot find OCI dll' when connecting with Oracle instant clients. Prior to version 9.2.5, connection is ok with instant clients in my working environment. Please advice.
Thanks,
Cliff
Re: Cannot find OCI dll.
Hello,
Please specify where and how you "registered" instant clients: registry, environmental variables, etc.
Please specify where and how you "registered" instant clients: registry, environmental variables, etc.
-
- Posts: 20
- Joined: Fri 01 Jun 2012 11:34
Re: Cannot find OCI dll.
Hi Alex,
I just have oracle instant client path variables in environment path only.
Thanks,
Cliff
I just have oracle instant client path variables in environment path only.
Thanks,
Cliff
Re: Cannot find OCI dll.
We cannot reproduce the problem. If you have specified the correct path (to the oci.dll library folder) in the system environmental variable PATH, ODAC will find and load this library. Please make sure the path really exists in this variable by executing the following command in the console:
>echo %path%
P.S. It is desirable that the path to the Oracle client is the first in this variable.
>echo %path%
P.S. It is desirable that the path to the Oracle client is the first in this variable.
-
- Posts: 20
- Joined: Fri 01 Jun 2012 11:34
Re: Cannot find OCI dll.
Hi Alex,
I traced into the source code and found that there is a procedure AddToOracleHomes() in the OraCall, the below code returns false so that no entry of instant client path is added to variable FHomes. Then the FDefault was set to nil in the procedure GetDefaultHome(). This is what I know so far, thanks!
Success := RegQueryValueEx(hOracleReg, 'OCIDLL', nil, nil, @HomePath, @Len) = ERROR_SUCCESS
I traced into the source code and found that there is a procedure AddToOracleHomes() in the OraCall, the below code returns false so that no entry of instant client path is added to variable FHomes. Then the FDefault was set to nil in the procedure GetDefaultHome(). This is what I know so far, thanks!
Success := RegQueryValueEx(hOracleReg, 'OCIDLL', nil, nil, @HomePath, @Len) = ERROR_SUCCESS
Re: Cannot find OCI dll.
If a correct path to the folder containing the instant client is specified in the system environmental variable, then the method GetDefaultHome (if no record was found in the registry before) searches in the PATH environmental variable. If you register instant client in the registry, you should add a OCIDLL parameter and specify the path to the library in this parameter.
-
- Posts: 20
- Joined: Fri 01 Jun 2012 11:34
Re: Cannot find OCI dll.
Hi,
I do not register instant clients in the registry and am sure that correct paths are specified in the system environmental path. I see that the paths are returned in GetEnvironmentPathVariable in GetDefaultHome, however the below condition returns false since the FHomes do not contain instant client path. Then, FDefault is set to nil.
Home := TOracleHome(FHomes);
if ((AnsiStrIComp(PChar(Home.Path + '\'), PChar(Str)) = 0) or
(AnsiStrIComp(PChar(Home.Path + '\bin\'), PChar(Str)) = 0)) and
CheckHomePath(Home.Path)
My oracle client setting works in ODAC version 9.1.4, 8.6.1 those I was trying to update and version 8.1.6 that I was using. But it fails in any versions after 9.1.4.
I do not register instant clients in the registry and am sure that correct paths are specified in the system environmental path. I see that the paths are returned in GetEnvironmentPathVariable in GetDefaultHome, however the below condition returns false since the FHomes do not contain instant client path. Then, FDefault is set to nil.
Home := TOracleHome(FHomes);
if ((AnsiStrIComp(PChar(Home.Path + '\'), PChar(Str)) = 0) or
(AnsiStrIComp(PChar(Home.Path + '\bin\'), PChar(Str)) = 0)) and
CheckHomePath(Home.Path)
My oracle client setting works in ODAC version 9.1.4, 8.6.1 those I was trying to update and version 8.1.6 that I was using. But it fails in any versions after 9.1.4.
Re: Cannot find OCI dll.
The provided code will be executed in the only case - if the FHomes.Count property is not null. Information is added in the AddToOracleHomes method only in case when there are records in the registry. If there are no records and FHomes.Count is null, then the following code is executed:
where Str is the path retrieved from the environmental variable, that is checked for presence of oci.dll or ociw32 at this path, and if these files are detected - the path is added to the Homes list and becomes default, from which the DLL is loaded.
Code: Select all
if CheckHomePath(Str) then begin
FDefault := Add('', Str, '', '', False);
exit;
end;
-
- Posts: 20
- Joined: Fri 01 Jun 2012 11:34
Re: Cannot find OCI dll.
Hi,
FHome is not null and there are records in since there are also installed oracle client in my machine.
FHome is not null and there are records in since there are also installed oracle client in my machine.
-
- Posts: 20
- Joined: Fri 01 Jun 2012 11:34
Re: Cannot find OCI dll.
Hi,
It is the case that if there are both installed and instant oracle clients (don't register in the registry) installed in a machine, the instant client path would not be picked up to be used in this case. Is that correct?
It is the case that if there are both installed and instant oracle clients (don't register in the registry) installed in a machine, the instant client path would not be picked up to be used in this case. Is that correct?
Re: Cannot find OCI dll.
Yes, currently, if a record about at least one Oracle client is found in the registry, then the path to the client (not registered in the registry) will be ignored in the environmental variables. We will change this behavior in the next version.
-
- Posts: 20
- Joined: Fri 01 Jun 2012 11:34
Re: Cannot find OCI dll.
Hi,
When will be the next version probably? Since we are going to upgrade from 8.1.6 to a newer version but not yet decided.
When will be the next version probably? Since we are going to upgrade from 8.1.6 to a newer version but not yet decided.
Re: Cannot find OCI dll.
We plan to release the new version next month.