I am trying to connect Oracle db with node.js using javaScript.
requirement -I am automating UI using webdriverIo which uses node.js and JS .In one flow I need to connect with oracle DB and get the value by running the query through automation. I tried everything but every time same response. I am trying to connect oracle db ,using Nodejs and JS .I am using VScode for coding.
I am trying to connect Oracle db with node.js using javaScript.
requirement -I am automating UI using webdriverIo which uses node.js and JS .In one flow I need to connect with oracle DB and get the value by running the query through automation. I tried everything but every time same response. I am trying to connect oracle db ,using Nodejs and JS .I am using VScode for coding.
Share Improve this question edited Jun 9, 2023 at 1:43 Christopher Jones 10.8k7 gold badges29 silver badges62 bronze badges asked Jun 7, 2023 at 22:42 Vaibhav SrivastavaVaibhav Srivastava 11 silver badge1 bronze badge3 Answers
Reset to default 3For Oracle Database 11gR2 or earlier:
Add a call to
initOracleClient()
to enable node-oracledb Thick modeAlternatively you could upgrade the database.
For Oracle Database 12c or later:
To use Thin mode: see the Oracle documentation on Finding and Resetting User Passwords That Use the 10G Password Version. In summary:
Make sure the database initialization parameter
sec_case_sensitive_logon
is not FALSE. In SQL*Plus as SYSDBA, runshow parameter sec_case_sensitive_logon
to check the value. (Notesec_case_sensitive_logon
has been removed in DB 21c).If the error still occurs, regenerate passwords e.g. run
ALTER USER x IDENTIFIED BY y
, if necessary.
Alternatively you could use Thick mode.
I faced with the same problem and after some time researching it I found out that here's some problem running typeorm@^0.3.17 and oracledb@^6.0.3 together on MacOS with M1 onboard. Also the problem is that typeorm uses an old version of oracledb package (^5.1.0). Hope that developers would update the version soon, PR is ready here https://github./typeorm/typeorm/pull/10285 I think after it will be merged the issue could be fixed
UPD: If you, like me, are using Mac on M1 processor try this guide
https://medium./oracledevs/how-to-install-node-oracledb-5-5-and-oracle-database-on-apple-m1-m2-silicon-941fccda692f
it could help
This has been answered in https://github./oracle/node-oracledb/issues/1584. Your user credentials are assigned to a less secure 10G password verifier.
Node-oracledb's Thin mode (v6.0.0 and higher) supports 11G and higher password verifiers, which are more secure. To reset your password verifier to use more secure versions in your Oracle Database, please follow the steps listed here - Resetting Oracle Database password verifiers.