Print Thread
Page 1 of 2 1 2
Yet Another Connection Question
#9800 03/27/08 02:27 PM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
Hello,

Yesterday I was called to check a connection problem on a server in which there were several Delphi applications, some written with BDE and some with DOA (all of them working with Oracle 10.2).
There was a connection problem with DOA applications only. Those written with BDE worked fine.
I solved this defining a ORACLE_HOME system level environment variable. My curiosity is: how does BDE work ? in the BDE settings I only see "oci.dll" in vendor init but there isn't a path.
Perhaps BDE checks the PATH variable ?
If so why doesn't DOA do the same ?
Just a curiosity .
Thanks in advance
Bye
Nicola

Re: Yet Another Connection Question
#9801 03/27/08 04:00 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
Both Direct Oracle Access and the BDE use the PATH environment variable, though Direct Oracle Access also uses the registry to determine valid homes. If for some reason they use a different OCI library, then things will indeed not work.


Marco Kalter
Allround Automations
Re: Yet Another Connection Question
#9802 03/27/08 06:48 PM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
This machine has only one Oracle Home and only
one oci.dll.
In the registry, though, the entries like "ALL_HOMES" and
"HOME" are missing.
The only registry key present is:

HKLM\Software\Oracle\KEY_OraClient10g_home2

Perhaps this could be the problem (I'll search the forum about this topic) ?
Another strange thing is that users reported that
the connection problem was not systematic but
random. Sometimes they were able to use the DOA
applications. This sounds strange to me.
Could this be possible in your
opinion ?
Thanks Bye
Nicola

Re: Yet Another Connection Question
#9803 03/28/08 04:27 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
What is the exact problem? Any error messages?


Marco Kalter
Allround Automations
Re: Yet Another Connection Question
#9804 03/28/08 04:42 PM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
There was no error message of any kind. The connection simply failed. I haven't see personally this version, though.
After the first errors programmer added this try except block in the application code:
try
TheOraclesession.Connected := true;
except
on E : Exception do
ShowMessage('Connection failed error: ' + E.message);
end;

I personally saw this version of the application
end it showed nothing (i.e. there was an empty
exception message).

Re: Yet Another Connection Question
#9805 04/09/08 06:19 PM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
The problem is coming out again.
The ORACLE_HOME variable (at system level) is still in place but it doesn't help.
I added some debugging (writes to event log window) statement to Oracle.pas and OracleCI.pas.
The problem is in the
OCIServerAttach
call which returns -2.
I tried searching the net and metalink but I still haven't found anything useful.
May you help me please ?
Thanks in advance
Bye
Nicola

Re: Yet Another Connection Question
#9806 04/10/08 03:13 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
The -2 status means "Invalid handle", indicating that the initialization of the Oracle Call Interface Environment already failed before this call.


Marco Kalter
Allround Automations
Re: Yet Another Connection Question
#9807 04/10/08 03:32 PM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
The initialization is in procedure InitOCI in OracleCI.pas ?
I have putted debug messages there too, but I haven't seen any error code.
This is a terminal server machine with lot (nearly 100) applications written in Delphi.
Only those written with DOA suffer this connection problem.
Those written with the BDE always connect without any problem. It is the first time that I encounter a problem with doa and not bde, usually the reverse happens :-(
Do you think it may depend on permissions ?
I tried elevating user to administrators group but
with no success. At the moment I keep a doa application logged in a administrator session. Keeping this in memory *seems* help other session to connect (perhaps they found oci already in memory). But still I wonder what does the bde do for connect ......
Thanks for your answer bye Nicola

Re: Yet Another Connection Question
#9808 04/11/08 12:26 PM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
Would it be possible, in your opinion, that the BDE is using an older connection mode (if any..) ?
Something like oci7 or oci8 .. ??
We are using BDE511 sqlora8.dll has the timestamp 16/6/2000 6.12

Re: Yet Another Connection Question
#9809 04/11/08 03:02 PM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
Does the 4.1.1. version contain changes about OCI connection process ?

Page 1 of 2 1 2

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.030s Queries: 14 (0.008s) Memory: 2.5569 MB (Peak: 3.0378 MB) Data Comp: Off Server Time: 2024-05-04 22:13:17 UTC
Valid HTML 5 and Valid CSS