ORA-12154: TNS: could not resolve the connect identifier specified(ORA-12154: TNS: 无法解析指定的连接标识符)
ORA-12514: TNS listener does not currently know of service requested in connect descriptor(ORA-12514: TNS 侦听器当前无法识别连接描述符中请求的服务)
ORA-12541: TNS: no listener(ORA-12541: TNS: 无侦听器)
ORA-12170: TNS:Connect timeout occurred(ORA-12170: TNS:发生连接超时)
通过 TNS_ADMIN 系统变量传达 TNSNames.ora 文件中连接详细信息的其余部分。请注意,您应将可选的服务名称和端口信息留空,否则它可能会通过复制信息对连接产生干扰。
启动终端并键入以下命令:
sudo nano /etc/launchd.conf
注意:Nano 是一种基于文本的编辑器,始终可在 Mac 计算机上找到。
提示时键入您的密码。
键入以下命令:
launch setenv TNS_ADMIN /etc
启动终端并键入以下命令:
export
您将看到所有系统变量的列表。查找:
declare -x TNS_ADMIN="/etc"
步骤摘要:
sudo su tableau
cd /opt/tableau/tableau_driver/oracle
注意:环境路径不应具有结尾斜杠;如果路径的格式不正确,用户可能会遇到 ORA-12154 错误。
如果服务器上安装了 Oracle 客户端,tnsnames.ora 文件将位于以下目录中:$ORACLE_HOME/network/admin。
可以使用以下命令验证此文件是否存在:
echo $ORACLE_HOME
将打印文件路径。
sudo find / -iname tnsnames.ora
将列出您的文件系统中任何 tnsnames.ora 文件的位置。
注意:不必安装 Oracle 客户端也可以将 tnsnames.ora 与 Tableau Server 结合使用。此步骤只是帮助您处理任何现有安装。
如果此计算机上没有 tnsnames.ora 文件,并且没有可从客户端工作站复制的该文件,则可以使用文本编辑器创建一个。请记住以下限制:
tnsnames.ora 文件名区分大小写,并且必须为全小写字母。
文件不应使用制表符间隔。
下面是一个潜在的条目模板。必须将括号中的元素替换为您从数据库管理员那里获取的值。
注意:尽管 Windows 或 Mac 计算机上的 TNSNames.ora 文件可能不需要 ADDRESS_LIST 条目,但 Linux 计算机上的 tnsnames.ora 文件需要此变量。
[net_service_name]=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=[protocol_address_information])
)
(CONNECT_DATA=
(SERVICE_NAME=[service_name])
)
)
例如:
Production =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = prod.corp.com)(PORT = 1521)
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
针对 Oracle 配置 ORACLE_HOME 和 TNS_ADMIN(如果在 Oracle 上配置了 SSL)
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
退出
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.