Page 1 of 1

Oracle 11 DRCP and ODAC Pooling

Posted: Thu 21 Jun 2012 15:23
by jdorlon
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

Re: Oracle 11 DRCP and ODAC Pooling

Posted: Thu 21 Jun 2012 20:24
by jdorlon
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.

Re: Oracle 11 DRCP and ODAC Pooling

Posted: Fri 22 Jun 2012 14:39
by AlexP
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

Re: Oracle 11 DRCP and ODAC Pooling

Posted: Fri 22 Jun 2012 14:51
by jdorlon
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.

Re: Oracle 11 DRCP and ODAC Pooling

Posted: Tue 26 Jun 2012 13:31
by AlexP
hello,

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

Re: Oracle 11 DRCP and ODAC Pooling

Posted: Tue 26 Jun 2012 13:35
by jdorlon
Thank you. I would be happy to help test this while it is in development.

Re: Oracle 11 DRCP and ODAC Pooling

Posted: Fri 19 Sep 2014 05:53
by odav
I know this post is two years old, but is DRCP for Oracle 11g now supported in ODAC?
And from which version on?

Re: Oracle 11 DRCP and ODAC Pooling

Posted: Fri 19 Sep 2014 06:10
by AlexP
We have fixed this behavior, the fix will be included to the next build.