Oracle 11 DRCP and ODAC Pooling

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

Oracle 11 DRCP and ODAC Pooling

Post by jdorlon » Thu 21 Jun 2012 15:23

Hello,

I am trying to use ODAC's pooling with Oracle 11 Database Resident Connection Pooling (DRCP).

I am setting up my TOraSession like this:

Code: Select all

    
    Session.Pooling := True;
    Session.PoolingOptions.PoolType := optOCI;
    Session.Server := '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=....)(PORT=1521))(CONNECT_DATA=(SERVER=POOLED)(SERVICE_NAME=...)))';
and I have a "ConnectionLost" event like this:

Code: Select all

procedure TMainForm.SessionConnectionLost(Sender: TObject; Component: TComponent;
  ConnLostCause: TConnLostCause; var RetryMode: TRetryMode);
begin
  Case ConnLostCause of
    clExecute,
    clOpen,
    clRefresh,
    clApply,
    clServiceQuery,
    clTransStart,
    clConnectionApply: RetryMode := rmReconnectExecute;
    clConnect, clUnknown: RetryMode := rmReconnect;
  end;
end;
The problem is that when connection times out, there is an infinite loop because the reconnnect attempt fails. The SessionConnectionLost proc just gets called again and again. ConnLostCause is always clExecute. When it tries to reconnect, an "ORA-24416: Invalid session Poolname was specified." is thrown and the loop continues.

Does ODAC support DRCP or am I doing something wrong?

Thanks,

John

jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

Re: Oracle 11 DRCP and ODAC Pooling

Post by jdorlon » Thu 21 Jun 2012 20:24

Here are some steps to reproduce the problem

1) On an 11g database, log in as sys and EXECUTE DBMS_CONNECTION_POOL.START_POOL();
2) Set TOraSession properties as specified below
3) Connect to the DB.
4) Wait for timeout to occur due to inactivity. You will know when timeout occurs when "select * from V_$CPOOL_CONN_INFO" doesn't return a row (do this query from another session)
5) now try to execute a query in the session created in step 3.

Thanks.

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

Re: Oracle 11 DRCP and ODAC Pooling

Post by AlexP » Fri 22 Jun 2012 14:39

Hello,

Presently, ODAC doesn't support the DRCP technology. We will consider the possibility of implementation of this feature in one of the next versions

jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

Re: Oracle 11 DRCP and ODAC Pooling

Post by jdorlon » Fri 22 Jun 2012 14:51

We would love to have it for the next version (or sooner!).

It seems like you are very close to having it working now. The only problem is the reconnect.

Thank you.

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

Re: Oracle 11 DRCP and ODAC Pooling

Post by AlexP » Tue 26 Jun 2012 13:31

hello,

We will try to support this feature in the next ODAC version

jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

Re: Oracle 11 DRCP and ODAC Pooling

Post by jdorlon » Tue 26 Jun 2012 13:35

Thank you. I would be happy to help test this while it is in development.

odav
Posts: 1
Joined: Tue 19 Sep 2006 12:26

Re: Oracle 11 DRCP and ODAC Pooling

Post by odav » Fri 19 Sep 2014 05:53

I know this post is two years old, but is DRCP for Oracle 11g now supported in ODAC?
And from which version on?

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

Re: Oracle 11 DRCP and ODAC Pooling

Post by AlexP » Fri 19 Sep 2014 06:10

We have fixed this behavior, the fix will be included to the next build.

Post Reply