Skip to content

ORA-12560: TNS:protocol adapter error when connecting to remote oracle DB from node.js #691

@baladreams

Description

@baladreams

I have installed oracledb (1.13.1) and trying to connect to a remote oracle database (Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production) from a simple node.js application (7.10.0). Following the installation guide, I have downloaded oracle instantclient_12_1 zip file and extracted it. The environment variables required for oracledb installation have been set to:

OCI_INC_DIR : C:\code\LittleBrother\instantclient_12_1\sdk\include
OCI_LIB_DIR : C:\code\LittleBrother\instantclient_12_1\sdk\lib\msvc
C:\code\LittleBrother\instantclient_12_1; has been added to the beginning of my windows path variable.

I am able to install oracledb package successfully, but when trying to connect to the target database, I keep getting the error:

ORA-12560: TNS:protocol adapter error

I have tried the following connection string formats:

voyager:1523/O12R1A
(DESCRIPTION=(ADDRESS=(PROTOCOL = TCP)(HOST = voyager)(PORT = 1523))(CONNECT_DATA =(SERVICE_NAME = O12R1A)))
(DESCRIPTION=(ADDRESS=(PROTOCOL = TCP)(HOST = voyager)(PORT = 1523))(CONNECT_DATA =(SID = O12R1A)))

But they all result in the same error. I am able to connect to the DB using SQL Developer using the connection strings. What other things could I be missing and need to check?

Sorry for the trouble!! I am new to node.js and oracle databases, so kindly bear with me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions