This discussion is archived
1 Reply Latest reply: Mar 5, 2008 11:43 PM by kmohan RSS

How to Use DRCP in Ruby-Oci8?

575020 Newbie
Currently Being Moderated
Database Resident Connection Pooling (DRCP) is a new feature of Oracle Database 11g. Fortunately Ruby-Oci8 has supported DRCP already.
In Ruby-Oci8 we execute ", password, dbname = nil, privilege = nil)" to build up a connection. To use DRCP we can simply add the string ":pooled" into the argument dbname. E.g.,
conn ="scott", "tiger", "localhost:1521/orcl:pooled")

Note: Before we use DRCP don't forget to update our DB Client or OIC to 11g or above and enable the pool on the server. We can enable the pool on the server side through the following SQL commands:
SQL> execute dbms_connection_pool.configure_pool(
2          pool_name => 'SYS_DEFAULT_CONNECTION_POOL',
3      minsize               => 4,
4          maxsize                => 40,
5          incrsize                => 2,
6          session_cached_cursors      => 20,
7          inactivity_timeout      => 300,
8          max_think_time           => 600,
9          max_use_session      => 500000,
10          max_lifetime_session      => 86400);
SQL> execute dbms_connection_pool.start_pool();
  • 1. Re: How to Use DRCP in Ruby-Oci8?
    kmohan Explorer
    Currently Being Moderated
    Using the POOLED connect string alone does not give the full benefit of DRCP. The connections should be created using OCI API as per Oracle documentation, for the applications to reuse the connections and share them across other 'like' applications. You can also go through this white paper: