4 Replies Latest reply on Mar 25, 2015 7:44 AM by Mark Fraser

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

    tonyfeole

      I have Tableau Desktop 7.0 installed on my local pc along with the Oracle Client drivers.  I am able to create a successful ODBC connection using MS Access and TNSNAMES.ora file.  However, when I try to connect directly to Oracle using Tablue Desktop, Server Name, Service Name and Port Number (under Advanced Settings) I get the Oracle database error 12154:  ORA-12154: TNS:cound not resolve the connection identified.  Has anyone come accross this same issue and was there a workable solution available?

       

      Thanks in advance.

       

      -Tony

        • 1. Re: Oracle database error 12154: ORA-12154: TNS:could not resolve the connect identifier specified
          Dimitri.B

          This can happen if Tableau can't find TNSNAMES.ora, which usually happens with non-standard installations of Oracle, i.e. Oracle home directory is not where Tableau expects it to be.

           

          You might need to set up an environment variable as described here: http://kb.tableausoftware.com/articles/knowledgebase/oracle-connection

          • 2. Re: Oracle database error 12154: ORA-12154: TNS:could not resolve the connect identifier specified
            David Edwards

            I guess this might be necro posting, but since it was never answered.....

             

            Tony,

             

            I am also experiencing this problem in v8.0 and v8.1.

             

            The article that Dimitri is referring to does not describe or address the problem that Tony and I are having.

            Specifically, it is for setting up the TNSNAMES.ora file so that you can use the service name to connect, rather than a host:port/servicename connection string.

             

             

            I was able to follow the instructions in the oracle connection knowledge base article that Dimitri linked above to set a TNS_NAMES environment variable to look up and utilize the corporate network names file. However it seems this is not what Tableau is actually using on my system.

             

            ------------------------

             

            Our server installation is still not using TNSNAMES.ora file, so our tableau server admin has requested that all published data sources use direct host:port/servicename  connection strings.

                 (Don't get me started on the fact that this should have been resolved)

             

            I am experiencing the same problem as Tony, so I am unable to connect to the database on my local machine using a direct address.  I feel like it is trying to look up the host in the TNS NAMES file, which it will never find.

             

            I have tried removing my TNS_NAMES environment variable, which did successfully stop my OTHER oracle client software (TOAD) from finding the correct file, but making this change did NOT actually inhibit Tableau from connecting using the TNS NAMES reference.

             

            Can anybody explain to me how to find, or where to find the oracle client driver that Tableau is using, and identify the location of the TNSNAMES.ora file that Tableau is using. It seems clear to me at this point that on my system it is NOT using the file indicated by the TNS_NAMES windows environment variable.

             

             

            Thanks!!

            • 3. Re: Oracle database error 12154: ORA-12154: TNS:could not resolve the connect identifier specified
              Mark Fraser

              I'm replying to this in the hope that someone has an answer.

              I'm also stuck at the point David mentions above... and looking for a solution

               

              Thanks in advance

              Mark

              • 4. Re: Oracle database error 12154: ORA-12154: TNS:could not resolve the connect identifier specified
                Mark Fraser

                Its cost me 2 days and more hair than I can afford to lose but I now have a working Oracle connection!!!!

                 

                I will explain how I got mine working, in the hope it useful to someone else in the future.

                 

                We had these errors -

                ORA-12154: TNS:cound not resolve the connection identified

                and

                ORA-12170: TNS:Connect timeout occurred

                 

                Pretty quickly I stumbled upon Toby Erkson's excellent article (Tableau [Server] Configuration/DB Connection for Oracle) but after reinstalling all drivers, rewriting the TNSNAMES.ora file, still no success.

                 

                The problem it turns out was actually related to the Server user permissions, the below is an extract from this article

                http://onlinehelp.tableau.com/current/server/en-us/runas.htm

                You can use a dedicated Active Directory (AD) user account for the Tableau Server service to run under, called a Run As User account. Some administrators choose to do this when published workbooks on Tableau Server connect to live data sources. The server's default Network Service account (NT AUTHORITY\NetworkService) doesn't have the correct permissions for connecting to data sources on other computers. A correctly configured AD account does.

                 

                When my Server was first installed, it was set up to use the NT Authority\Network Service user but (unknown to our IT guys) that didn't have the necessary permissions. Tableau Server needs to run as a user with the necessary permissions and network service doesn't provide these.

                My IT department has created a new user with the permissions detailed here - Identify the Account

                 

                I then swapped the Tableau user from Network service to the new Tableau user (with the increased permissions) in Server configuration, made the necessary amendments to the TNSNAMES.ora file and BINGO working connection!

                 

                This isn't the only problem/ solution with Oracle connections but it worked for me so I thought I should share as I haven't seen it documented elsewhere.

                 

                Best of luck!

                 

                Cheers

                Mark