Change sample defaults and update comment on the driver name in V$ views
This commit is contained in:
parent
442957530f
commit
d0a043e2fe
37
doc/api.md
37
doc/api.md
|
@ -501,6 +501,11 @@ Order Entry system. Users will only be given sessions of the
|
||||||
appropriate class, allowing maximal reuse of resources in each case,
|
appropriate class, allowing maximal reuse of resources in each case,
|
||||||
and preventing any session information leaking between the two systems.
|
and preventing any session information leaking between the two systems.
|
||||||
|
|
||||||
|
If `connectionClass` is set for a non-pooled connection, the driver
|
||||||
|
name is not recorded in `V$` views.
|
||||||
|
See
|
||||||
|
[End-to-end Tracing, Mid-tier Authentication, and Auditing](#endtoend).
|
||||||
|
|
||||||
##### Example
|
##### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
@ -2599,9 +2604,6 @@ oracledb.getConnection(
|
||||||
. . .
|
. . .
|
||||||
```
|
```
|
||||||
|
|
||||||
Applications that request [DRCP](#drcp) connections, for example with
|
|
||||||
`myhost/XE:pooled`, must use local [Connection Pooling](#connpooling).
|
|
||||||
|
|
||||||
For more information on Easy Connect strings see
|
For more information on Easy Connect strings see
|
||||||
[Understanding the Easy Connect Naming Method](https://docs.oracle.com/database/122/NETAG/configuring-naming-methods.htm#NETAG255)
|
[Understanding the Easy Connect Naming Method](https://docs.oracle.com/database/122/NETAG/configuring-naming-methods.htm#NETAG255)
|
||||||
in the Oracle documentation.
|
in the Oracle documentation.
|
||||||
|
@ -2660,10 +2662,6 @@ oracledb.getConnection(
|
||||||
. . .
|
. . .
|
||||||
```
|
```
|
||||||
|
|
||||||
Applications that request [DRCP](#drcp) connections, for example where
|
|
||||||
the connection description contains `(SERVER=POOLED)`, must use
|
|
||||||
local [Connection Pooling](#connpooling).
|
|
||||||
|
|
||||||
#### <a name="notjdbc"></a> 8.1.3 JDBC and Node-oracledb Connection Strings Compared
|
#### <a name="notjdbc"></a> 8.1.3 JDBC and Node-oracledb Connection Strings Compared
|
||||||
|
|
||||||
Developers familiar with Java connection strings that reference a
|
Developers familiar with Java connection strings that reference a
|
||||||
|
@ -3182,15 +3180,11 @@ works on it for a relatively short duration, and then releases it.
|
||||||
To use DRCP in node-oracledb:
|
To use DRCP in node-oracledb:
|
||||||
|
|
||||||
1. The DRCP pool must be started in the database: `SQL> execute dbms_connection_pool.start_pool();`
|
1. The DRCP pool must be started in the database: `SQL> execute dbms_connection_pool.start_pool();`
|
||||||
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.
|
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, and the statistic views will record large values for `NUM_MISSES`.
|
||||||
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)`.
|
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)`.
|
||||||
|
|
||||||
DRCP connections can only be used with node-oracledb's local
|
For efficiency, it is recommended that DRCP connections should be used
|
||||||
[connection pool](#poolclass). If a standalone (non-local pool)
|
with node-oracledb's local [connection pool](#poolclass).
|
||||||
connection is created with
|
|
||||||
[`oracledb.getConnection()`](#getconnectiondb) and the `connectString`
|
|
||||||
indicates a DRCP server should be used, then an error *ORA-56609:
|
|
||||||
Usage not supported with DRCP* occurs.
|
|
||||||
|
|
||||||
The DRCP 'Purity' is SELF for DRCP connections. This allows reuse of
|
The DRCP 'Purity' is SELF for DRCP connections. This allows reuse of
|
||||||
both the pooled server process and session memory, giving maximum benefit
|
both the pooled server process and session memory, giving maximum benefit
|
||||||
|
@ -3232,7 +3226,7 @@ var oracledb = require('oracledb');
|
||||||
oracledb.getConnection(
|
oracledb.getConnection(
|
||||||
{
|
{
|
||||||
externalAuth: true,
|
externalAuth: true,
|
||||||
connectString: "localhost/orcl"
|
connectString: "localhost/orclpdb"
|
||||||
},
|
},
|
||||||
. . .
|
. . .
|
||||||
```
|
```
|
||||||
|
@ -6040,7 +6034,7 @@ oracledb.getConnection(
|
||||||
{
|
{
|
||||||
user : "hr",
|
user : "hr",
|
||||||
password : "welcome",
|
password : "welcome",
|
||||||
connectString : "localhost/orcl"
|
connectString : "localhost/orclpdb"
|
||||||
},
|
},
|
||||||
function(err, connection)
|
function(err, connection)
|
||||||
{
|
{
|
||||||
|
@ -6103,10 +6097,9 @@ understanding that these require round-trips to the database.
|
||||||
|
|
||||||
#### The Add-on Name
|
#### The Add-on Name
|
||||||
|
|
||||||
For every connection, the Oracle Database `V$SESSION_CONNECT_INFO`
|
The Oracle Database `V$SESSION_CONNECT_INFO` view shows the version of
|
||||||
view shows the version of node-oracledb in use. This allows DBAs to
|
node-oracledb in use. This allows DBAs to verify that applications
|
||||||
verify that applications are using the desired add-on version. For
|
are using the desired add-on version. For example, a DBA might see:
|
||||||
example, a DBA might see:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
SQL> SELECT UNIQUE sid, client_driver
|
SQL> SELECT UNIQUE sid, client_driver
|
||||||
|
@ -6120,6 +6113,10 @@ SQL> SELECT UNIQUE sid, client_driver
|
||||||
33 node-oracledb : 2.0.14
|
33 node-oracledb : 2.0.14
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note if [`oracledb.connectionClass`](#propdbconclass) is set for a
|
||||||
|
non-pooled connection, the `CLIENT_DRIVER` value will not be set for
|
||||||
|
that connection.
|
||||||
|
|
||||||
## <a name="promiseoverview"></a> 20. Promises and node-oracledb
|
## <a name="promiseoverview"></a> 20. Promises and node-oracledb
|
||||||
|
|
||||||
Node-oracledb supports Promises with all asynchronous methods. The native Promise
|
Node-oracledb supports Promises with all asynchronous methods. The native Promise
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. */
|
/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. */
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
* [//]host_name[:port][/service_name][:server_type][/instance_name]
|
* [//]host_name[:port][/service_name][:server_type][/instance_name]
|
||||||
*
|
*
|
||||||
* Commonly just the host_name and service_name are needed
|
* Commonly just the host_name and service_name are needed
|
||||||
* e.g. "localhost/orcl" or "localhost/XE"
|
* e.g. "localhost/orclpdb" or "localhost/XE"
|
||||||
*
|
*
|
||||||
* If using a tnsnames.ora file, the file can be in a default
|
* If using a tnsnames.ora file, the file can be in a default
|
||||||
* location such as $ORACLE_HOME/network/admin/tnsnames.ora or
|
* location such as $ORACLE_HOME/network/admin/tnsnames.ora or
|
||||||
|
@ -76,7 +76,7 @@ module.exports = {
|
||||||
|
|
||||||
// For information on connection strings see:
|
// For information on connection strings see:
|
||||||
// https://github.com/oracle/node-oracledb/blob/master/doc/api.md#connectionstrings
|
// https://github.com/oracle/node-oracledb/blob/master/doc/api.md#connectionstrings
|
||||||
connectString : process.env.NODE_ORACLEDB_CONNECTIONSTRING || "localhost/orcl",
|
connectString : process.env.NODE_ORACLEDB_CONNECTIONSTRING || "localhost/orclpdb",
|
||||||
|
|
||||||
// Setting externalAuth is optional. It defaults to false. See:
|
// Setting externalAuth is optional. It defaults to false. See:
|
||||||
// https://github.com/oracle/node-oracledb/blob/master/doc/api.md#extauth
|
// https://github.com/oracle/node-oracledb/blob/master/doc/api.md#extauth
|
||||||
|
|
Loading…
Reference in New Issue