1. sid and service name are totally different thing

In short: SID = the unique name of your DB, ServiceName = the alias used when connecting

and, if you use an SID, you need to configure a tnsnames.ora file.
(sometimes, we cannot expect all ones who manage dbs can understand db well or can give perfect infomation) from doc of node-oracledb, it says that SID is an old-school style. so, you have to write a tnsnames.ora file to configure it.

2. sometimes enviroment varibles are not work well

click here, you will find where to put your tnsnames.ora file

and this is what you may set

export ORACLE_HOME="/usr/lib/oracle/18.5/client64"
export TNS_ADMIN="/usr/lib/oracle/18.5/client64/network/admin"
export PATH="$PATH:/usr/lib/oracle/18.5/client64/bin"
export LD_LIBRARY_PATH="/usr/lib/oracle/18.5/client64/lib:$LD_LIBRARY_PATH"

3. configure tnsnames.ora file carefully

4. set environment varibles well, or may cause sqlplus cannot work well (because of losing lib path)

Ref: Oracle TNS names not showing when adding new connection to SQL Developer
How SID is different from Service name in Oracle tnsnames.ora

Instant Client Installation for Linux x86-64 (64-bit)


Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)