Official source of container configurations, images, and examples for Oracle products and projects
Any clue about how to solve this issue without installing any client as there is no internet connection in the pc?
A related link: https://github.com/oracle/docker-images/issues/2447
Connection = Python-oracledb.connect (user=USERNAME, password=PASSWORD, dsn = DSN, nencoding=UTF-16, encoding=UTF-16)
For completeness, the
nencoding parameters are ignored in python-oracledb (and can be removed) because the driver uses UTF-8 as mentioned by @anthony-tuininga.
initOracleClient()doesn't do what you (and we all) want it to do. The error about libnnz will occur if the system library search path (e.g. LD_LIBRARY_PATH, or that set by ldconfig) doesn't contain the Oracle client libraries before Node.js starts. You should avoid passing libDir to
Also see the blog posts:
@sosoba Proof of concept looks fine. We are almost at the stage where we know what internal approvals & signoffs we need. Hopefully this will be smooth since python-oracledb has set a precedent. Cross your fingers.
Can you include a complete, runnable script with the exact SQL statement? Also include the CREATE TABLE statement. Show us how you are measuring the memory use and what results you are seeing. Finally, what are the versions of cx_Oracle and of the Oracle client libraries used? You can get these by run the script shown in the issue template.
@mvorisek how long does nslookup take in that environment? You could turn on Oracle network tracing to check if snlinGetAddrInfo is being called multiple times. (Ping me if you need steps). Our net team say it's basically a DNS setup issue as DNS lookup shouldn't hang.
@jifbrodeur No problems at all.
Do you mean https://github.com/oracle/node-oracledb/blob/main/examples/connect.js doesn't run for you? It works fine for me without any change. Can you triple-check whether you had a typo somewhere? Typos are easy to make, and hard to spot!
$ node connect.js Connection was successful!
connectString has been in node-oracledb since day 1. It was back in node-oracledb 2.1 that we added an alias
connectionString for the same thing. I could understand why
connectionString might not work for older versions of node-oracledb, but
connectString should always work in any version.
@arabellayao I understand that, but you still don't need to close PRs since the owner can rebase them on the latest main. Creating a new PR is just management overhead. And in busy projects it would be impossible for any PR to always be on the latest main.
With Anthony's changes you won't need
find_library() because your script can check (or ignore) if
init_oracle_client() fails, which will leave you in Thin mode.
@dannyb648 knowing whether it is a LOB or an object would be a big help. In case the issue is lower in the stack, can you enable OCI tracing by either setting the environment variable EVENT_10842=15 (if you know where logs go), or by creating a sqlnet.ora file with something like this which will create logs in
ADR_BASE=/tmp DIAG_ADR_ENABLED=ON EVENT_10842=15
@pvenkatraman please take a look.
@arabellayao please don't close PRs like this. This PR can easily be rebased on main.
get connection --> [ queryStream at stream.on('data') -> at stream.on('end')] -> close connection
However the warning from examples/selectstream.js is
Note: do not close connections on 'end'.
You should only close connections after the Stream 'close' event.
@zhaoanna PS it's time to update from Node 8 and node-oracledb 4.2 more recent versions.
Compare your code with the doc and examples to make sure you are not closing resources too early. Check the scope of things like connections to make sure you are not overwriting a connection prematurely.