ORA-12154: TNS: could not resolve the connect identifier specified
ORA-12514: TNS listener does not currently know of service requested in connect descriptor
ORA-12541: TNS: no listener
ORA-12170: TNS:Connect timeout occurred
Choose the relevant environment:
The rest of the connection details from the TNSNames.ora file are communicated through the TNS_ADMIN system variable. Note that you should leave the optional service name and port information empty, otherwise it may interfere with the connection by duplicating information.
Create an oracle.properties file containing the following text (Example):
oracle.net.tns_admin=C:\\Oracle_Client\\network\\admin
Change the path if necessary to reference the location of the tnsnames.ora file within the host file system. The double backslashes \\ are intentional and required even though the \\ paths will not work if copied and pasted directly into windows file explorer. The oracle.properties file will only function properly with double backslashes in this context.
Place the file in the following location:
Desktop: Documents\My Tableau Repository\Datasources
Server: C:\ProgramData\Tableau\Tableau Server\data\tabsvc\vizqlserver\Datasources (or equivalent path if alternate install location employed). Be sure to create the folder if it doesn't already exist.
Server only: Once the files and folders have been created, ensure the run as user is provided with appropriate permissions to the file and restart Tableau Server.
Further information regarding JDBC properties files may be found here.
Start Terminal and type the following command:
sudo nano /etc/launchd.conf
Note: Nano is a text-based editor that is always available on Mac computers.
Type your password when prompted.
Type the following:
launch setenv TNS_ADMIN /etc
Start Terminal and type the following command:
export
You will see a list of all system variables. Look for:
declare -x TNS_ADMIN="/etc"
You should now be able to start Tableau Desktop on your Mac and connect to the Oracle database, providing only the server name from the TNSNames.ora or LDAP.ora file.
Summary of Steps:
For all versions:
2020.4 and later:
Create an /var/opt/tableau/tableau_server/data/tabsvc/vizqlserver/Datasources/oracle.properties file with the below text:
Example: oracle.net.tns_admin=/etc
Change the /etc if necessary to point to the path of the tnsnames.ora file within the file system on your Server.
Further information regarding JDBC properties files may be found here.
Note: LDAP.ora can also be used in LDAP environment. The default location for the file is $ORACLE_HOME/network/admin.
If the Oracle client is installed on your server, the tnsnames.ora file will be located in the following directory: $ORACLE_HOME/network/admin.
You can verify if this file exists with the following commands:
echo $ORACLE_HOME
will print the file path.
sudo find / -iname tnsnames.ora
will list the locations of any tnsnames.ora files in your file system.
Note: It is not necessary to have the Oracle client installed to use tnsnames.ora with Tableau Server. This step is simply to help you work with any existing installation.
If no tnsnames.ora file is present on this computer, and you do not have one to copy up from a client workstation, you can create one using a text editor. Keep in mind the following restrictions:
The tnsnames.ora file name is case sensitive, and must be in all lower-case letters.
The file should not use tab-spacing.
Below is a potential template for an entry. Elements in brackets must be replaced by values obtained from your database administrator.
Note: Although a TNSNames.ora file on a Windows or Mac computer may not require the ADDRESS_LIST entry, the tnsnames.ora file on a Linux computer requires this variable.
[net_service_name]=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=[protocol_address_information])
)
(CONNECT_DATA=
(SERVICE_NAME=[service_name])
)
)
For example:
Production =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = prod.corp.com)(PORT = 1521)
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
Configuring ORACLE_HOME and TNS_ADMIN for Oracle (With SSL configured on Oracle)
sudo su -l tableau
touch /var/opt/tableau/tableau_server/.config/systemd/tableau_server.conf.d/oracle.conf
echo "ORACLE_HOME=/u01/app/oracle/product/12.1.0/client_1" | tee -a /var/opt/tableau/tableau_server/.config/systemd/tableau_server.conf.d/oracle.conf
echo "TNS_ADMIN=/u01/app/oracle/product/12.1.0/client_1/network/admin" | tee -a /var/opt/tableau/tableau_server/.config/systemd/tableau_server.conf.d/oracle.conf
chmod 744 /var/opt/tableau/tableau_server/.config/systemd/tableau_server.conf.d/oracle.conf
exit
cd /opt/tableau/tableau_server/packages/scripts.near.xx.xxxx.xxxx/
sudo ./stop-administrative-services
sudo ./start-administrative-services
source /etc/profile.d/tableau_server.sh
001453730

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.