Forum Discussion

aspirationalbec's avatar
aspirationalbec
Frequent Visitor
1 year ago

ORA-12560: TNS:protocol adapter error

I am connecting Power BI to oracle database via odbc and a system dsn.

Trying to add the data source to our on-prem gateway, I'm coming up with two errors:

ODBC: ERROR [HY000] [Oracle][ODBC][Ora]ORA-12560: TNS:protocol adapter error

ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [HY000] [Oracle][ODBC][Ora]ORA-12560: TNS:protocol adapter error

The gateway is definitely on, it has the odbc driver installed and a system database name has been created. The TNS names match. Restarted the gateway and restarted my laptop. Worked out that the driver is based on what is on my local machine rather than the driver that is on the gateway.

3 Replies

  • Hi aspirationalbec -while connecting Power BI to an Oracle database via ODBC and a system DSN typically point to issues with the Oracle client configuration or the ODBC driver settings.

    check once the tnsname.ora correctly configured and accessible by the Oracle client on the machine where the on-premises gateway is installed. The TNS names should match exactly what you are using in your ODBC connection.

    Oracle Instant Client Downloads | Oracle India

    Check if the Oracle environment variables (ORACLE_HOME and TNS_ADMIN) are set correctly on the gateway machine. The TNS_ADMIN variable should point to the directory containing the tnsnames.ora file.

    firewall on the gateway machine is not blocking the Oracle listener port (default is 1521). 

     

    hope this helps.

    • lbendlin's avatar
      lbendlin
      Super User

      Also, use tnsping if you have that installed.  That will tell you if the client is using the correct tnsnames.ora file.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi aspirationalbec , hello lbendlin and rajendraongole1, thank you for your prompt reply!

     

    I'm checking how the things are going on about this issue. Whether the answer helps you?

     

    If you find any answer is helpful to you, please remember to accept it.

     

    It will help others who meet the similar question in this forum.

     

    Thank you for your understanding.