RelationalDBDesign RelationalDBDesign


Network Config   «Prev  Next»
Lesson 7Connection pooling using MTS, part 2
Objective Enable Connection Pooling.

Enable Oracle Connection Pooling

By default, connection pooling is disabled on both incoming and outgoing network connections. To enable connection pooling, you must alter the mts_dispatchers parameter in the init.ora file. You can enable the Net8 Connection Pooling feature by adding the POOL argument to the mts_dispatchers parameter. The following MouseOver illustrates several different configurations of the mst_dispatchers parameter.
  1. If a number is specified, then Connection Pooling is enabled for both incoming and outgoing network connections, and the number indicates the timeout in ticks for both incoming and outgoing network connections
  2. If ON, YES, TRUE, or BOTH is specified, then Connection Pooling is enabled for both incoming and outgoing network connections, and the default timeout (set by Net8) will be used for both.
  3. If IN is specified, then Connection Pooling is enabled for incoming network connections and the default timeout (set by Net8) will be used for incoming network connections.
  4. If OUT is specified, then Connection Pooling is enabled for outgoing network connections and the default timeout (set by Net8) will be used for outgoing network connections.
Enable Connection Pooling
In real-world situations, connection pooling is rarely used except in cases where the database server is overwhelmed with incoming Net8 requests.
The next lesson explains how to monitor the MTS structure with scripts.

(DRCP) Database Resident Connection Pooling

Database Resident Connection Pooling (DRCP) provides a connection pool of dedicated servers for typical Web application scenarios. A Web application typically makes a database connection, uses the connection briefly, and then releases it. Through DRCP, the database can scale to tens of thousands of simultaneous connections.
DRCP provides the following advantages:
  1. Complements middle-tier connection pools that share connections between threads in a middle-tier process.
  2. Enables database connections to be shared across multiple middle-tier processes. These middle-tier processes may belong to the same or different middle-tier host.
  3. Enables a significant reduction in key database resources required to support many client connections. For example, DRCP reduces the memory required for the database and boosts the scalability of the database and middle tier. The pool of available servers also reduces the cost of re-creating client connections.
  4. Provides pooling for architectures with multi-process, single-threaded application servers, such as PHP and Apache, that cannot do middle-tier connection pooling.

DRCP uses a pooled server, which is the equivalent of a dedicated server process (not a shared server process) and a database session combined. The pooled server model avoids the overhead of dedicating a server for every connection that requires the server for a short period.
Clients obtaining connections from the database resident connection pool connect to an Oracle background process known as the connection broker. The connection broker implements the pool functionality and multiplexes pooled servers among inbound connections from client processes.