Skip to content

Commit 293339f

Browse files
Documentation improvements.
1 parent 3044d46 commit 293339f

File tree

4 files changed

+245
-166
lines changed

4 files changed

+245
-166
lines changed

doc/src/release_notes.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Thin Mode Changes
2020
#) Fixed bug in handling invisible columns with object type names containing
2121
``%ROWTYPE``
2222
(`issue 325 <https://github.com/oracle/python-oracledb/issues/325>`__).
23-
#) Fixed bug that would cause connections to be marked checked out but be
24-
unavailable for use permanently
23+
#) Fixed bug that would cause pooled connections to be marked checked out but
24+
be unavailable for use permanently
2525
(`issue 221 <https://github.com/oracle/python-oracledb/issues/221>`__).
2626
#) Fixed bug that would cause an internal error to be raised when attempting
2727
to close a connection that has been forcibly closed by the database.
@@ -34,9 +34,9 @@ Thick Mode Changes
3434
Common Changes
3535
++++++++++++++
3636

37-
#) Added support for columns of type VECTOR.
38-
#) Added support for database type :data:`oracledb.DB_TYPE_INTERVAL_YM` which
39-
is represented in Python by instances of the new
37+
#) Added support for columns of type :ref:`VECTOR <vectors>`.
38+
#) Added support for columns of type INTERVAL YEAR TO MONTH which can be
39+
represented in Python by instances of the new
4040
:ref:`oracledb.IntervalYM <interval_ym>` class
4141
(`issue 310 <https://github.com/oracle/python-oracledb/issues/310>`__).
4242
#) Added support for processing :ref:`tnsnames.ora files <optnetfiles>`

doc/src/user_guide/appendix_a.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ values.
483483
* - VECTOR
484484
- :data:`~oracledb.DB_TYPE_VECTOR`
485485
- No relevant notes
486-
-
486+
- array.array
487487

488488
Binding of contiguous PL/SQL Index-by BINARY_INTEGER arrays of string, number, and date are
489489
supported in python-oracledb Thin and Thick modes. Use :meth:`Cursor.arrayvar()` to build

doc/src/user_guide/connection_handling.rst

Lines changed: 53 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,33 +1511,40 @@ hits and misses to show the pool efficiency.
15111511

15121512
.. _implicitconnpool:
15131513

1514-
Implicit Connection Pooling with DRCP and PRCP
1515-
----------------------------------------------
1514+
Implicit Connection Pooling
1515+
===========================
15161516

1517-
Starting from Oracle Database 23ai, Python applications that use
1518-
:ref:`DRCP <drcp>` and Oracle Connection Manager in Traffic Director Mode's
1519-
(CMAN-TDM) pooling capability `Proxy Resident Connection Pooling (PRCP)
1520-
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-E0032017-03B1-
1521-
4F14-AF9B-BCC87C982DA8>`__ can enable `implicit connection pooling <https://
1517+
`Implicit connection pooling <https://
15221518
www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-A9D74994-D81A-47BF-BAF2-
1523-
E4E1A354CA99>`__ with DRCP and PRCP. For more information on PRCP, see the
1524-
Oracle technical brief `CMAN-TDM — An Oracle Database connection proxy for
1525-
scalable and highly available applications <https://download.oracle.com/
1526-
ocomdocs/global/CMAN_TDM_Oracle_DB_Connection_Proxy_for_scalable_apps.pdf>`__.
1527-
1528-
With implicit connection pooling, applications do not need to explicitly close
1529-
or release a connection to return the connection back to the DRCP or PRCP pool.
1530-
Applications that do not use client-side connection pooling can take advantage
1531-
of the implicit connection pooling feature with either Thin or Thick mode.
1532-
Thick mode requires Oracle 23ai Client libraries for implicit connection
1533-
pooling support. Thin mode works with implicit connection pooling from
1534-
python-oracledb 2.1 onwards.
1535-
1536-
Implicit connection pooling uses two types of boundary values to determine
1537-
when connections should be released back to the DRCP or PRCP pool. The
1538-
boundary value can be specified in the ``pool_boundary`` parameter as detailed
1539-
:ref:`below <useimplicitconnpool>`. The two boundary values which can be
1540-
specified in the ``pool_boundary`` parameter are:
1519+
E4E1A354CA99>`__ is useful for applications that cause excess database server
1520+
load due to the number of :ref:`standalone connections <standaloneconnection>`
1521+
opened. When these applications cannot be rewritten to use
1522+
:ref:`python-oracledb connection pooling <connpooling>`, then implicit
1523+
connection pooling may be an option to reduce the load on the database system.
1524+
1525+
Implicit connection pooling allows application connections to share pooled
1526+
servers in :ref:`DRCP <drcp>` or Oracle Connection Manager in Traffic Director
1527+
Mode's (CMAN-TDM) `Proxy Resident Connection Pooling (PRCP)
1528+
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-E0032017-03B1-
1529+
4F14-AF9B-BCC87C982DA8>`__. Applications do not need to be modified. The
1530+
feature can be enabled by altering the application's :ref:`connection string
1531+
<connstr>`. Applications do not need to explicitly acquire, or release,
1532+
connections to be able use a DRCP or PRCP pool.
1533+
1534+
Implicit connection pooling is available in python-oracledb Thin and
1535+
:ref:`Thick <enablingthick>` modes. It requires Oracle Database
1536+
23ai. Python-oracledb Thick mode additionally requires Oracle Client 23ai
1537+
libraries.
1538+
1539+
With implicit connection pooling, connections are internally acquired from the
1540+
DRCP or PRCP pool when they are actually used by the application to do database
1541+
work. They are internally released back to pool when not in use. This may
1542+
occur between the application's explicit :meth:`oracledb.connect()` call and
1543+
:meth:`Connection.close()` (or the application's equivalent connection release
1544+
at end-of-scope).
1545+
1546+
The internal connection release can be controlled by setting a value in the
1547+
``pool_boundary`` parameter. The value can be either:
15411548

15421549
- *statement*: If this boundary is specified, then the connection is released
15431550
back to the DRCP or PRCP connection pool when the connection is implicitly
@@ -1560,11 +1567,11 @@ specified in the ``pool_boundary`` parameter are:
15601567

15611568
.. _useimplicitconnpool:
15621569

1563-
To use implicit connection pooling in python-oracledb:
1570+
To use implicit connection pooling in python-oracledb with DRCP:
15641571

1565-
1. Enable the DRCP pool in the database. For example in SQL*Plus:
1572+
1. Enable DRCP in the database. For example in SQL*Plus::
15661573

1567-
``SQL> EXECUTE DBMS_CONNECTION_POOL.START_POOL();``
1574+
SQL> EXECUTE DBMS_CONNECTION_POOL.START_POOL()
15681575

15691576
2. Specify to use a pooled server in:
15701577

@@ -1602,13 +1609,13 @@ To use implicit connection pooling in python-oracledb:
16021609
3. Set the pool boundary to either *statement* or *transaction* in:
16031610

16041611
- The :ref:`Easy Connect string <easyconnect>`. For example, to use the
1605-
statement boundary::
1612+
*statement* boundary::
16061613

16071614
dsn = "localhost:1521/orclpdb:pooled?pool_boundary=statement"
16081615

16091616
- Or the ``CONNECT_DATA`` section of the
16101617
:ref:`Connect Descriptor string <netservice>`. For example, to use
1611-
the transaction boundary::
1618+
the *transaction* boundary::
16121619

16131620
tnsalias = (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mymachine.example.com)
16141621
(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)
@@ -1627,8 +1634,22 @@ To use implicit connection pooling in python-oracledb:
16271634
*SELF*. You can specify the purity using the ``POOL_PURITY`` parameter
16281635
in the connection string to override the default purity value.
16291636

1630-
Note that it is recommended to use python-oracledb's local :ref:`connpooling`
1631-
over implicit connection pooling.
1637+
Similar steps can be used with PRCP. For general information on PRCP, see the
1638+
technical brief `CMAN-TDM — An Oracle Database connection proxy for scalable
1639+
and highly available applications <https://download.oracle.com/
1640+
ocomdocs/global/CMAN_TDM_Oracle_DB_Connection_Proxy_for_scalable_apps.pdf>`__.
1641+
1642+
It is recommended to use python-oracledb's local :ref:`connpooling` where
1643+
possible instead of implicit connection pooling. This gives multi-user
1644+
applications more control over pooled server reuse.
1645+
1646+
You should thoroughly test your application when using implicit connection
1647+
pooling to ensure that the internal reuse of database servers does not cause
1648+
any problems. For example, the connection `session id and serial number
1649+
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-9F0DCAEA-A67E
1650+
-4183-89E7-B1555DC591CE>`__ may vary throughout the lifetime of the
1651+
application connection as different servers may be used at different times.
1652+
16321653

16331654
.. _proxyauth:
16341655

0 commit comments

Comments
 (0)