5 Replies Latest reply on Aug 4, 2015 7:29 AM by Eric Felker

    Oracle database connection error

    Jianhai Sun

      After I published a workbook with a worksheet and a bashboard in to Tableau Server, I logged in to the server and select that worksheet/dashboard and I received an error below:

      An unexpected error occurred on the server. If you continue to receive this error please contact your Tableau Server Administrator.

       

      TableauException: Oracle database error 12705: ORA-12705: Cannot access NLS data files or invalid environment specified Unable to connect to the server "10.10.1.90". Check that the server is running and that you have access privileges to the requested database.
      2013-11-05 18:20:20.369 (Unk24KwURj4AAA40AbEAAADF,0,1)

       

      Would you like to reset the view?

        • 1. Re: Oracle database connection error
          Tracy Rodgers

          Hi Jianhai,

           

          The following link may be a good starting point:

           

          Resolving ORA-12705: Cannot access NLS data files or invalid environment specified

           

          -Tracy

          • 2. Re: Oracle database connection error
            Jianhai Sun

            Thanks for the link. I think it's environment setting issue within Tableau Server because I can connect to Oracle database using Tableau Desktop and create a worksheet without any problems. If I login Tableau Server and select Admin tab on the left, select Data Connections and select a connection with Oracle connection type. In the Edit Data Connection screen, I cannot find the database service name. Samething is true if I click on a data connection with Oracle type and I cannot find the database service name from the Attributes screen either.

            Oracle.jpg

            • 3. Re: Oracle database connection error
              Roberto Morales

              i'm running into this same issue with tableau desktop 8.2. As context, i just went thru all kinds of machinations trying to get my local mac instantclient (sqlplus) working. i had to set environment variables and all that other great stuff before i got it working. what i am assuming here is that tableau is either running as a different user and somehow can't use the properly configured environemnt variables, or it can access them and they point to my oracle install and not whatever files tableau packages for it's own oracle functionality. does that make any sense? (i don't know where tableau puts it's oracle bits or if it's drivers can/can't play well with Oracle Instant Client install...


              still searching for a way to get my desktop<->oracle db set up working

              • 4. Re: Oracle database connection error
                Roberto Morales

                quick update on my particular issue - i found that there were many places where environment variables are set and that some early installation of a tool had set NLS_LANG in a not commonly viewed location. my suggestion is to look in every

                .file you can find that can store/set environment variables. In my case NLS_LANG was incorrectly set in

                 

                /private/etc/launchd.conf

                 

                i hope this helps someone - it drove me crazy for much too long

                 

                :-)

                 

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

                second update:

                 

                i think the real issue is Toad Mac Edition. well it's both Tableau's and Toad's fault. each expects a different NLS_LANG environment variable. in launchd.conf Tableau needs it to be set to:

                setenv NLS_LANG AMERICAN_AMERICA.AL32UTF8

                 

                and Toad wants it set to the location:

                setenv NLS_LANG /Library/Oracle/instantclient_11_2

                 

                so unless someone knows of a workaround for these two to co-exist, i guess i ahve to choose one or the other (or edit launchd.conf and reboot.)

                i hope someone has a better way to deal with this - i love having both tools available...

                • 5. Re: Oracle database connection error
                  Eric Felker

                  Hi Robert,

                   

                  Thanks very much for putting your experience here for the rest to see. After looking at my own environment variables, I felt pretty confident that changing NLS_LANG would get me fixed up, but I am still seeing my issue unfortunately. So the digging continues.

                   

                  I will report back here once I figure out what my problem is. Surprising that it is still this difficult to connect to an Oracle DB in 2015!

                   

                  Thx,

                  Eric

                   

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

                   

                  UPDATE:

                   

                  In my case, I ended up being able to set environment variable for NSL, and then launch the app via Terminal. I still could not launch via GUI app bundle though.

                   

                  I ended up following this thread: http://stackoverflow.com/questions/25385934/setting-environment-variables-via-launchd-conf-no-longer-works-in-os-x-yosem…

                   

                  Once complete, my app bundle icon now works. Seems that this is a Yosemite specific issue. Hope it helps someone else!