Closed jmc420 closed 1 year ago
Do you have a case sensitive password?
I would expect this syntax to work:
connection = await oracledb.getConnection({
user : "SYSTEM",
password : "MyPassword",
connectString : "localhost/XE"
});
or with connectString : "localhost/XEPDB1"
This is not valid syntax for node-oracledb: connectString: "SYSTEM/Password@localhost:1521/XE"
There is no default password for the HR user. You can create the HR user using the scripts in https://github.com/oracle-samples/db-sample-schemas
Thanks, It's now all working.
I am running Oracle XE 21c in a Docker container and I can connect to it with a JDBC thin connection using the JDBC url jdbc:oracle:thin:@localhost:1521:XE using the SYSTEM account. I can also connect with sqlplus either by logging into the terminal Docker instance or by using sqlplus on the host OSX machine.
When I try to connect to it using NodeJS OracleDB example code described here:
https://node-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html, I cannot get the client to connect using either:
or
I get an error ORA-01017: invalid username/password; logon denied.
sqlplus works fine if I use this connection string sqlplus SYSTEM/Password@localhost:1521/XE
if I change the code to:
I get the error ORA-12154: TNS:could not resolve the connect identifier specified
It seems odd that I can connect with sqlplus but not with node-oracledb. Any ideas?