Skip to content

Commit 4db6373

Browse files
committed
Add the new files and prepare for 6.8
1 parent 5ba224d commit 4db6373

24 files changed

+1006
-106
lines changed

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
# node-oracledb version 6.8.0-dev
2-
3-
**This release is under development and information may be incomplete**
1+
# node-oracledb version 6.8.0
42

53
The node-oracledb add-on for Node.js powers high performance Oracle Database
64
applications. Applications can be written in TypeScript, or directly in
75
JavaScript.
86

9-
Use node-oracledb 6.8.0-dev to connect Node.js 14.6, or later, to Oracle
7+
Use node-oracledb 6.8.0 to connect Node.js 14.6, or later, to Oracle
108
Database. Older versions of node-oracledb may work with older versions of
119
Node.js.
1210

doc/src/api_manual/connection.rst

+17
Original file line numberDiff line numberDiff line change
@@ -1838,6 +1838,23 @@ Connection Methods
18381838
- ``metaData``: Contains properties equivalent to those given by ``execute()`` :ref:`metaData <execmetadata>`. This property exists only for queries.
18391839
- ``statementType``: An integer corresponding to one of the :ref:`SQL Statement Type Constants <oracledbconstantsstmttype>`.
18401840

1841+
.. method:: connection.isCompressionEnabled()
1842+
1843+
.. versionadded:: 6.8
1844+
1845+
.. code-block:: javascript
1846+
1847+
isCompressionEnabled()
1848+
1849+
This synchronous function returns a boolean indicating whether network
1850+
data compression is enabled for a connection.
1851+
1852+
See :ref:`networkcompression`.
1853+
1854+
.. note::
1855+
1856+
This function can only be used in node-oracledb Thin mode.
1857+
18411858
.. method:: connection.isHealthy()
18421859

18431860
.. versionadded:: 5.4

doc/src/api_manual/oracledb.rst

+64
Original file line numberDiff line numberDiff line change
@@ -2160,6 +2160,38 @@ Oracledb Methods
21602160
This optional property overrides the :attr:`oracledb.machine` property.
21612161

21622162
.. versionadded:: 6.7
2163+
* - ``networkCompression``
2164+
- Boolean
2165+
- Thin
2166+
- .. _createpoolpoolattrsnetworkcompression:
2167+
2168+
Indicates if network data compression needs to be enabled or disabled for a database connection. Enabling data compression reduces the size of the Oracle Net Session Data Unit (SDU) that is to be sent over a connection.
2169+
2170+
The default value is *false*.
2171+
2172+
For node-oracledb Thick mode, network compression is enabled by setting the `compression parameters <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-F7B17046-3F25-4AE8-A325-39B9DFF506E9>`__ in connect strings (:ref:`Easy Connect string <easyconnect>` or a :ref:`Connect Descriptor string <embedtns>`). Alternatively, you can enable network compression by setting the `SQLNET.COMPRESSION <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-61CE4FA9-3ABB-4E9B-B788-FB57E6B56F47>`__ parameter in the :ref:`sqlnet.ora <tnsadmin>` network configuration file.
2173+
2174+
See :ref:`networkcompression` for more information.
2175+
2176+
.. versionadded:: 6.8
2177+
* - ``networkCompressionThreshold``
2178+
- Number
2179+
- Thin
2180+
- .. _createpoolpoolattrscompressionthreshold:
2181+
2182+
The minimum data size, in bytes, for which compression should be performed on the Oracle Net Session Data Unit (SDU).
2183+
2184+
The default value is *1024* bytes.
2185+
2186+
The minimum data size is *200* bytes.
2187+
2188+
If this property is set to any value below *200*, then the default value of *1024* bytes is taken as the networkCompressionThreshold value.
2189+
2190+
For node-oracledb Thick mode, network compression threshold can be set by using the `SQLNET.COMPRESSION_THRESHOLD <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-8CB3FC39-0775-441C-9205-39288B9200FD>`__ parameter in the :ref:`sqlnet.ora <tnsadmin>` network configuration file.
2191+
2192+
See :ref:`networkcompression` for more information.
2193+
2194+
.. versionadded:: 6.8
21632195
* - ``osUser``
21642196
- String
21652197
- Thin
@@ -2931,6 +2963,38 @@ Oracledb Methods
29312963
See :ref:`Connection Tagging and Session State <connpooltagging>`.
29322964

29332965
.. versionadded:: 3.1
2966+
* - ``networkCompression``
2967+
- Boolean
2968+
- Thin
2969+
- .. _getconnectiondbattrsnetworkcompression:
2970+
2971+
Indicates if network data compression needs to be enabled or disabled for a database connection. Enabling data compression reduces the size of the Oracle Net Session Data Unit (SDU) that is to be sent over a connection.
2972+
2973+
The default value is *false*.
2974+
2975+
For node-oracledb Thick mode, network compression is enabled by setting the `compression parameters <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-F7B17046-3F25-4AE8-A325-39B9DFF506E9>`__ in connect strings (:ref:`Easy Connect string <easyconnect>` or a :ref:`Connect Descriptor string <embedtns>`). Alternatively, you can enable network compression by setting the `SQLNET.COMPRESSION <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-61CE4FA9-3ABB-4E9B-B788-FB57E6B56F47>`__ parameter in the :ref:`sqlnet.ora <tnsadmin>` network configuration file.
2976+
2977+
See :ref:`networkcompression` for more information.
2978+
2979+
.. versionadded:: 6.8
2980+
* - ``networkCompressionThreshold``
2981+
- Number
2982+
- Thin
2983+
- .. _getconnectiondbattrscompressionthreshold:
2984+
2985+
The minimum data size, in bytes, for which compression should be performed on the Oracle Net Session Data Unit (SDU).
2986+
2987+
The default value is *1024* bytes.
2988+
2989+
The minimum data size is *200* bytes.
2990+
2991+
If this property is set to any value below *200*, then the default value of *1024* bytes is taken as the networkCompressionThreshold value.
2992+
2993+
For node-oracledb Thick mode, network compression threshold can be set by using the `SQLNET.COMPRESSION_THRESHOLD <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-8CB3FC39-0775-441C-9205-39288B9200FD>`__ parameter in the :ref:`sqlnet.ora <tnsadmin>` network configuration file.
2994+
2995+
See :ref:`networkcompression` for more information.
2996+
2997+
.. versionadded:: 6.8
29342998
* - ``newPassword``
29352999
- String
29363000
- Both

doc/src/release_notes.rst

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Common Changes
2828
#) Fixed :attr:`~dbObject.length` property for the database object
2929
collection types, which was broken from node-oracledb 6.0.
3030

31+
#) Added OCI and Azure SDK support for token based authentication.
32+
3133
#) Added support for returning maximum identifier length allowed by the
3234
database using the new property :attr:`connection.maxIdentifierLength`.
3335

doc/src/user_guide/tuning.rst

+143
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,149 @@ The main part of the application performs the “work” and calls
346346
after = await getRT(sid);
347347
console.log('Round-trips required: ' + (after - before)); // 1 round-trip
348348
349+
.. _networkcompression:
350+
351+
Advanced Network Compression
352+
============================
353+
354+
`Advanced Network Compression <https://www.oracle.com/pls/topic/lookup?ctx=
355+
dblatest&id=GUID-9F86FD03-0895-4D8A-8F0C-E9DFDD30E804>`__ reduces the size of
356+
the Oracle Net Session Data Unit (SDU) that is sent over a connection. If
357+
compression is negotiated for a connection, the client and database server
358+
compress the data before sending it over the network and decompress the
359+
compressed data once received. This results in increased effective network
360+
throughput and reduced bandwidth utilization. The ability to enable network
361+
data compression in Thin mode was introduced in node-oracledb 6.8.
362+
363+
Two parameters need to be configured in both the application and database
364+
server to take advantage of Advanced Network Compression. Based on the
365+
settings of these parameters, the client and server negotiate and determine
366+
whether data compression should be used at the time of connection
367+
establishment.
368+
369+
To use Advanced Network Compression, you must:
370+
371+
1. Enable data compression:
372+
373+
a. In your application by:
374+
375+
- Setting the ``networkCompression`` property to *true* in the
376+
:meth:`oracledb.getConnection()` or :meth:`oracledb.createPool()`
377+
methods if you are using node-oracledb Thin mode.
378+
379+
.. code-block:: javascript
380+
381+
const connection = await oracledb.getConnection({
382+
user : "hr",
383+
password : mypw, // mypw contains the hr schema password
384+
networkCompression : true,
385+
connectString : "mydbmachine.example.com:1521/orclpdb1"
386+
});
387+
388+
- Or by setting the ``compression`` parameter to *ON* in an
389+
:ref:`Easy Connect string <easyconnect>` if you are using either
390+
node-oracledb Thin mode or Thick mode. For example:
391+
392+
.. code-block:: javascript
393+
394+
const connection = await oracledb.getConnection({
395+
user : "hr",
396+
password : mypw, // mypw contains the hr schema password
397+
connectString : "mydbmachine.example.com?compression=on"
398+
});
399+
400+
- Or by setting the ``compression`` parameter to *ON* in a
401+
:ref:`Connect Descriptor <embedtns>` if you are using either
402+
node-oracledb Thin mode or Thick mode. For example:
403+
404+
.. code-block:: javascript
405+
406+
const connection = await oracledb.getConnection({
407+
user : "hr",
408+
password : mypw, // mypw contains the hr schema password
409+
connectString : "(DESCRIPTION=(COMPRESSION=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=mymachine.example.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))"
410+
});
411+
412+
- Or by setting the `SQLNET.COMPRESSION <https://www.oracle.com/pls/
413+
topic/lookup?ctx=dblatest&id=GUID-61CE4FA9-3ABB-4E9B-B788-
414+
FB57E6B56F47>`__ parameter to *ON* in the :ref:`sqlnet.ora <tnsadmin>`
415+
file if you are using node-oracledb Thick mode.
416+
417+
b. In the database server by setting the ``SQLNET.COMPRESSION`` parameter to
418+
*ON* in the :ref:`sqlnet.ora <tnsadmin>` file.
419+
420+
Data compression will be enabled on a connection only if it is set in both
421+
your application and the database server.
422+
423+
2. Specify the compression level:
424+
425+
a. In your application by:
426+
427+
- Not doing any additional configuration in your application if you are
428+
using node-oracledb Thin mode since this mode only supports *HIGH*
429+
compression level.
430+
431+
- Or by setting the ``compression_level`` parameter to *HIGH*, or *LOW*,
432+
or both in a :ref:`Connect Descriptor <embedtns>` if you are using
433+
node-oracledb Thick mode. For example, setting the compression level
434+
to both:
435+
436+
.. code-block:: javascript
437+
438+
const connection = await oracledb.getConnection({
439+
user : "hr",
440+
password : mypw, // mypw contains the hr schema password
441+
connectString : "(DESCRIPTION=(COMPRESSION=ON)(COMPRESSION_LEVELS=(LEVEL=LOW)(LEVEL=HIGH))(ADDRESS=(PROTOCOL=TCP)(HOST=mymachine.example.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))"
442+
});
443+
444+
The default value of the ``compression_level`` parameter is *LOW*.
445+
446+
- Or by setting the `SQLNET.COMPRESSION_LEVELS <https://www.oracle.com/
447+
pls/topic/lookup?ctx=dblatest&id=GUID-EFFC6896-05A6-4C19-A64D-
448+
46B2A1EF7693>`__ parameter to *(HIGH)*, or *(LOW)*, or both
449+
*(HIGH,LOW)* in the :ref:`sqlnet.ora <tnsadmin>` network configuration
450+
file if you are using node-oracledb Thick mode.
451+
452+
b. In the database server by setting the ``SQLNET.COMPRESSION_LEVELS``
453+
parameter to *(HIGH)*, or *(LOW)*, or both *(HIGH,LOW)* in the
454+
:ref:`sqlnet.ora <tnsadmin>` file.
455+
456+
If you are using node-oracledb Thin mode, the compression level set in the
457+
database server should contain *HIGH*. Otherwise, data compression will not
458+
take place.
459+
460+
You can also specify the minimum data size (in bytes) for which compression
461+
should be performed. In node-oracledb Thin mode, this can be done by using the
462+
``networkCompressionThreshold`` property of the
463+
:meth:`oracledb.getConnection()` or :meth:`oracledb.createPool()` methods. For
464+
example:
465+
466+
.. code-block:: javascript
467+
468+
const connection = await oracledb.getConnection({
469+
user : "hr",
470+
password : mypw, // mypw contains the hr schema password
471+
networkCompression : true,
472+
networkCompressionThreshold: 200,
473+
connectString : "mydbmachine.example.com:1521/orclpdb1"
474+
});
475+
476+
In node-oracledb Thick mode, network compression threshold can be set by using
477+
the `SQLNET.COMPRESSION_THRESHOLD <https://www.oracle.com/pls/topic/lookup?ctx
478+
=dblatest&id=GUID-8CB3FC39-0775-441C-9205-39288B9200FD>`__ parameter in the
479+
:ref:`sqlnet.ora <tnsadmin>` network configuration file.
480+
481+
Note that compression is not performed on an SDU if the size of that SDU is
482+
less than the value of the ``networkCompressionThreshold`` property. For
483+
example, if the value of this property is *200*, then compression will not
484+
take place if the SDU is less than this value. The minimum value of this
485+
property is *200* bytes. If this property is set to any value below 200, then
486+
the default value of *1024* bytes is taken as the networkCompressionThreshold
487+
value.
488+
489+
To check whether data compression is enabled on a connection in node-oracledb
490+
Thin mode, you can use the :meth:`connection.isCompressionEnabled()` method.
491+
349492
.. _stmtcache:
350493

351494
Statement Caching

0 commit comments

Comments
 (0)