KNOWLEDGE BASE

Failure to Establish a Connection to Oracle Database Using Oracle Wallet


Published: 27 Dec 2021
Last Modified Date: 10 Jan 2022

Issue

Failure to establish the connection to Oracle database using Oracle Wallet.

Environment

  • Tableau Server 2020.2.5
  • Red Hat (RHEL) Linux 7
  • Oracle

Resolution

 According to the Oracle Guide about Connect with JDBC driver and Wallets, additional libraries are required besides ojdbc8.jar.

Tableau Desktop:

  1. Save the ojdbc8.jar, ucp.jar,oraclepki.jar, osdt_core.jar and osdt_cert.jar files to c:/program files/Tableau/Drivers.
  2. Add an “oracle.properties” file to the c:\Users\<username>\Documents\MyTableau Respository\Datasources folder. 
  3. Content in oracle.properties should be: 
oracle.net.tns_admin=${TNS_ADMIN} 
oracle.net.wallet_location=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=${TNS_ADMIN})))


Note: ${TNS_ADMIN} is the directory path which contains the file tnsnames.ora

For example:
If  the file tnsnames.ora exists in the diretcory /opt/tableau.wallet

oracle.properties file content should be:

oracle.net.tns_admin=/opt/tableau.wallet
oracle.net.wallet_location=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/opt/tableau.wallet)))

Tableau Server:

  1. Save the ojdbc8.jar, ucp.jar,oraclepki.jar, osdt_core.jar and osdt_cert.jar files to /opt/tableau/tableau_driver/jdbc
  2. Add the "oracle.properties" file to the /var/opt/tableau/tableau_server/data/tabsvc/vizqlserver/Datasources folder.
  3. Use Tableau Desktop to logon to Oracle server with TNS alias leaving service and port blank, selecting 'Use a specific username and password' and using the username whose credentials have been added to Oracle wallet.
  4. Make sure the Wallet files have been copied to Tableau Server and correctly configured.
  5. Publish the data source to Tableau Server and set "Embedded password in connection".
  6. Open the data source from the Web. 

Cause

Specific data source connection configuration is required when Oracle Wallet is used.
Did this article resolve the issue?