Program gets stuck when connecting to DB

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
bij
Posts: 17
Joined: Thu 29 Mar 2007 08:26

Program gets stuck when connecting to DB

Post by bij » Mon 18 Jun 2007 07:43

A customer of ours has the follwing problem with the direct connection of ODAC V6.05.0.7 (Delphi 2006) to Oracle V7.1.3.2.0 run on a VAX server. There are two DBs on two servers that are set up the same way. The connection to one of them works fine. But if they try to connect to the other one, the program will not connect, use 100% CPU and will not respond any more. No error or anything returns. The Event BeforeConnect fires but ConnectChange doesn't.

Do you have any idea what can cause this behavior?

Cheers
bij

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 19 Jun 2007 07:46

Please specify whether you can connect to the database when the Direct option of the TOraSession component is set to False.

bij
Posts: 17
Joined: Thu 29 Mar 2007 08:26

Post by bij » Tue 19 Jun 2007 07:49

If Direct is set to False the connection to the DB works fine.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 20 Jun 2007 08:49

We could not reproduce the problem. Please send to odac*crlab*com a complete small sample that demonstrates the problem, including script to create server objects.

bij
Posts: 17
Joined: Thu 29 Mar 2007 08:26

Post by bij » Wed 20 Jun 2007 09:17

I am sorry, but this is not possible. The problem just occurs at one of our customers databases. We cannot reproduce the problem in our developing environment either. Is there another possibility how to provide you with further information on where to find the problem? Is there a function to log detailed debugging information? Do you have an idea what database configuration could possibly cause this behavior?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 22 Jun 2007 08:47

ODAC supports Oracle starting with 7.3 version. Therefore problem can occur because you use ODAC with Oracle 7.1.

YourFather
Posts: 3
Joined: Wed 30 Jan 2008 19:42

Post by YourFather » Wed 30 Jan 2008 20:01

I'm experiencing same problem, but using ODAC 4.00.0.1 Net Edition w/Delphi Enterprise 7.
I've an app wich connects to one in five distinct servers (say 10.1.1.2:1521:ORCL / 10.1.1.3:1521:ORCL / 10.1.1.4:1521:ORCL / 10.1.1.5:1521:ORCL). In all servers exists a single user USER1 with same password for all servers.
In a form i've a combobox with this information...
I've a datamodule with an orasession (dbApp) and an oraquery (qryApp)...

Steps:
1. I'm select server 1 to connect.
2. Call dbApp.Disconnect.
3. Set dbApp.ConnectStr := ...
4. Call dbApp.Connect.
5. Connection stablishes OK
6 I'm select server 2 from combobox
7. Call dbApp.Disconnect.
8. Set dbApp.ConnectStr := ...
9. Call dbApp.Connect. My app frezees here.

I tried other alternatives:
- Destroy dbApp after select another server, create again, setting info and connecting. Fails.

- Creating datamodule after selection of another server, create, setting info and connecting. Fails.

YourFather
Posts: 3
Joined: Wed 30 Jan 2008 19:42

Post by YourFather » Wed 30 Jan 2008 20:07

Additional info:
I'm using OraSession.Options.Net := true
Our servers run Oracle 9i on Windows 2003 Server or HP-UX v11
If i run my app with single connection, it works fine...

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 01 Feb 2008 09:14

Try to call FreeNet procedure after disconnecting. (You need to add OraNet unit to 'uses' clause.)

YourFather
Posts: 3
Joined: Wed 30 Jan 2008 19:42

Post by YourFather » Fri 01 Feb 2008 21:43

I tried with FreeNet proc, but don't works.
Throws a "Need Oracle Call Interface" exception on first selection.
Second selection works fine.
Third selection freezes app.

* Edit *
Calling InitNet procedure before Connect procedure, don't throws an exception, but, app freezes over an over...

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 06 Feb 2008 08:32

You can try to upgrade ODAC. Please check if the problem occurs with the last ODAC version (6.25.1.13).

Post Reply