Skip to content

Commit 9c73ac3

Browse files
committed
Mention DRCP users need to use a local connection pool
1 parent 493ae4c commit 9c73ac3

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

doc/api.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,9 +1940,12 @@ oracledb.getConnection(
19401940
. . .
19411941
```
19421942
1943-
For more information see
1943+
Applications that request [DRCP](#drcp) connections, for example with
1944+
`myhost/XE:pooled`, must use local [Connection Pooling](#connpooling).
1945+
1946+
For more information on Easy Connect strings see
19441947
[Understanding the Easy Connect Naming Method](https://docs.oracle.com/database/121/NETAG/naming.htm#i498306)
1945-
in the Oracle documentation..
1948+
in the Oracle documentation.
19461949
19471950
#### <a name="tnsnames"></a> 8.1.2 Net Service Names for Connection Strings
19481951
@@ -1980,7 +1983,11 @@ The `tnsnames.ora` file can be in a default location such as
19801983
`/etc/tnsnames.ora`. Alternatively set the `TNS_ADMIN` environment
19811984
variable and put the file in `$TNS_ADMIN/tnsnames.ora`.
19821985
1983-
For more information see
1986+
Applications that request [DRCP](#drcp) connections, for example where
1987+
the `tnsnames.ora` connection description contains `(SERVER=POOLED)`,
1988+
must use local [Connection Pooling](#connpooling).
1989+
1990+
For more information on `tnsnames.ora` files see
19841991
[General Syntax of tnsnames.ora](https://docs.oracle.com/database/121/NETRF/tnsnames.htm#NETRF260)
19851992
in the Oracle documentation.
19861993
@@ -2175,29 +2182,27 @@ multiple client processes or run on multiple middle-tier application
21752182
servers. DRCP reduces the overall number of connections that a
21762183
database must handle.
21772184
2178-
DRCP is distinct from node-oracledb's local
2179-
[connection pool](#poolclass). The two pools can be used separately,
2180-
or together.
2181-
21822185
DRCP is useful for applications which share the same database credentials, have
21832186
similar session settings (for example date format settings and PL/SQL
21842187
package state), and where the application gets a database connection,
21852188
works on it for a relatively short duration, and then releases it.
21862189
21872190
To use DRCP in node-oracledb:
21882191
2189-
1. The DRCP pool must be started in the database: `execute dbms_connection_pool.start_pool();`
2190-
2. The `getConnection()` property `connectString` must specify to use a pooled server, either by the Easy Connect syntax like `myhost/sales:POOLED`, or by using a `tnsnames.ora` alias for a connection that contains `(SERVER=POOLED)`.
2191-
3. The [`connectionClass`](#propdbconclass) should be set by the node-oracledb application. If it is not set, the pooled server session memory will not be reused optimally.
2192-
2193-
The DRCP 'Purity' value is NEW for
2194-
[`oracledb.getConnection()`](#getconnectiondb) connections that do not
2195-
use a local connection pool. These connections reuse a DRCP pooled
2196-
server process (thus avoiding the costs of process creation and
2197-
destruction) but do not reuse its session memory. The 'Purity' is
2198-
SELF for [`pool.getConnection()`](#getconnectionpool) connections,
2199-
allowing reuse of the pooled server process and session memory, giving
2200-
maximum benefit from DRCP. See the Oracle documentation on
2192+
1. The DRCP pool must be started in the database: `SQL> execute dbms_connection_pool.start_pool();`
2193+
2. The [`connectionClass`](#propdbconclass) should be set by the node-oracledb application. If it is not set, the pooled server session memory will not be reused optimally.
2194+
3. The `getConnection()` property `connectString` must specify to use a pooled server, either by the Easy Connect syntax like `myhost/sales:POOLED`, or by using a `tnsnames.ora` alias for a connection that contains `(SERVER=POOLED)`.
2195+
2196+
DRCP connections can only be used with node-oracledb's local
2197+
[connection pool](#poolclass). If the non-local pool connection
2198+
method `oracledb.getConnection()` is called and the `connectString`
2199+
indicates a DRCP server should be used, then an error *ORA-56609:
2200+
Usage not supported with DRCP* occurs.
2201+
2202+
The DRCP 'Purity' is SELF for DRCP
2203+
[`pool.getConnection()`](#getconnectionpool) connections. This allows
2204+
reuse of the pooled server process and session memory, giving maximum
2205+
benefit from DRCP. See the Oracle documentation on
22012206
[benefiting from scalability](http://docs.oracle.com/database/121/ADFNS/adfns_perf_scale.htm#ADFNS506).
22022207
22032208
The

0 commit comments

Comments
 (0)