KNOWLEDGE BASE

Oracle error 12154 Connecting To Oracle Connection on Computer With Different Settings from Computer Where Connection was Created


Published: 30 Oct 2018
Last Modified Date: 17 May 2019

Issue

When using an Oracle connection which was created on a computer that uses LDAP, TNSNAMES, or EZCONNECT on a computer that does NOT use any of these, the connection will no longer work and the following error occurs:

"Oracle database error 12154: ORA-12154: TNS:could not resolve the connect identifier specified"

This behavior can occur when:
  • Sharing workbooks between computers running Tableau Desktop, one of which has the above configuration file(s), and the other does not.
  • Publishing a live connection to Oracle from a computer running Tableau Desktop that uses one of the above configuration file(s) to an instance of Tableau Server which does not. (If the connection is published as an extract, it will work, but will not refresh.)

Environment

  • Tableau Desktop
  • Tableau Server
  • Oracle

Resolution

  1. If it is an option, make sure the Oracle configuration matches between all computers where the connection will be used. (All computers set up with LDAP/TNSNAMES or without.)
  2. Edit the connection that originated from the machine using TNSNAMES to:
    • Include the service name and port number, use the FQDN (fully qualified domain name) in the "Server" text field of the connection dialog.
    • NOTE: Connection dialog may not have specific text boxes for service name/port, in which case place all three variables (server, service name, and port number) in the "Server" text field of the connection dialog in the following format: [server FQDN]:[port]/[service name]
  3. Go through troubleshooting for "ORA-12154 connecting to Oracle when not using TNSNAMES.ora"

Cause

When TNSNAMES.ora or LDAP.ora are in use, they allow Oracle connections and their parameters to be defined outside of the Tableau connector. The "net_service_name" portion will be used as the server field, which when entered along with credentials fetches the service name and port number from the TNSNAMES/LDAP file. Computers that do not use TNSNAMES/LDAP require the service name and port number to be entered for the connection to work, they also require using an FQDN for the server instead of a customized name (ex: "oracle.test.tsi.lan" would be the FQDN, whereas "Oracle_01" could be used as a net_service_name)
Did this article resolve the issue?