Question

I am using Oracle 11g database server and now I am getting to see that OCI's persistent connection isn't much of a use, and a new connection is created anyway when a new user accesses the page. I would like to have a pool of connections which are used, and no new connections are not created. I came across DRCP (database resident connection pooling), but I am unable to understand how to set the number of connections that can be created per server.

Questions

  • From the documentation available on the Oracle website, I can set the minimum and maximum number of pooled servers, but where would I be setting the number of connections??
  • Has anyone worked with Oracle 11g's database resident connection pooling?
  • If the database servers are unix boxes, can we do any ODBC connection pooling??
Was it helpful?

Solution

where would I be setting the number of connections?

You can specify the min and max number of connections in the pool using

SQL>execute dbms_connection_pool.configure_pool(null, minsize=>10, maxsize=>100);

If the database servers are unix boxes, can we do any ODBC connection pooling?

I'm not quite sure why you're asking this. You can take advantage of DRCP via OCI in PHP, as long as you have the Oracle 11g client. Just specify your connection string like myhost.dom.com:1521/sales:POOLED and make your connections using oci_pconnect().


Here's a few resources that may be of help:

OTHER TIPS

BenV is right.+1  Since it sounds like you don't want your pool size to change, you should set the minsize the same as the maxsize. Here are some additional Oracle entries on DRCP:

The first link has a comparison of Dedicated Server, Shared Server, and DRCP. Shared server is another route you could consider, but it sounds like DRCP might be a better fit.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top