Tableau Server Configuration/DB Connection for Oracle

Version 2

    Written by Toby Erkson

     

    This document serves to help those having Oracle connection issues, specifically the kind that produce the following Oracle errors:

    • ORA-12154 TNS: Could not resolve service name

    • ORA-12514 TNS: listener could not resolve SERVICE_NAME given in connect descriptor

    • ORA-12541 TNS:no listener

    • ORA-12170 TNS:Connect timeout occurred

     

    Though initially written for Tableau Server admins the content will work for Tableau Desktop users as well.

     

    Oracle Connection

    If the Tableau Server is initially being set up for Oracle connectivity then follow the instructions under Initial Setup otherwise you’re going to be adding additional connections, so go to Adding Servers below.

    A good indicator that something isn’t set up correctly is any of the Oracle errors mentioned above.

     

    Initial Setup

    If Oracle Client (or similar) isn’t installed, then install the appropriate Tableau driver for the version you’ll be accessing  -- the newest isn’t always best (but beware of compatibility issues) -- and manually create the directory C:\Oracle_Client\network\admin

     

    Find a user with Oracle Client installed and copy the necessary lines from TNSNAMES.ORA file on their machine into a text editor (I highly recommend the GNU application “Notepad++”) and save the file as TNSNAMES.ORA in the C:\Oracle_Client\network\admin folder created earlier.

     

    This is an example of TNSNAMES.ORA contents (names and addresses have been changed to protect the innocent):
    # Production EDP1 Database
    EDP1.world =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (COMMUNITY = tcp.world)
    (PROTOCOL = TCP)
    (Host = 99.999.9.99)
    (Port = 1521)))

        (CONNECT_DATA = (SID = EDP1)))

     

    Next, update the machine's PATH as described in the knowledge base article, Oracle-connection, section "Set the TNS_Admin environment variable", and also reboot the server.

     

    Adding Servers

    If the Tableau Server has already been set up then the only thing needed to do if adding a new Oracle data source is to update the TNSNAMES.ORA file with the server info.

     

    Accessing the Oracle database

    Users now open Tableau Desktop, Connect to Data, On a server, and select Oracle.  In the connection dialog window, "Step 1" would be 99.999.9.99:1521/EDP1.world in this example, or whatever you entered in TNSNAMES.ORA in your case.  If you were to click on the Advanced... button here's how you would enter in the info for this example:

     

    Server Name:  99.999.9.99

    Service Name:  EDP1.world

    Port:  1521

     

    Click the OK button.

    The other Steps are filled out as necessary; typically a specific username and password will be required.