返回顶部
首页 > 资讯 > 错误编码 >ORA-12171: TNS:could not resolve connect identifier: string ORACLE 报错 故障修复 远程处理
  • 301
分享到

ORA-12171: TNS:could not resolve connect identifier: string ORACLE 报错 故障修复 远程处理

报错故障TNS 2023-11-05 19:11:47 301人浏览 泡泡鱼
摘要

文档解释 ORA-12171: TNS:could not resolve connect identifier: string Cause: A connection to a database or other service was

文档解释

ORA-12171: TNS:could not resolve connect identifier: string

Cause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.

Action:
– If you are using local naming (TNSNAMES.ORA file):
– Make sure that “TNSNAMES” is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the oracle Net profile (sqlNET.ORA)
– Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.
– Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.
– Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable.
– If you are using directory naming:
– Verify that “LDAP” is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
– Verify that the LDAP directory server is up and that it is accessible.
– Verify that the net service name or database name used as the connect identifier is configured in the directory.
– Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier
– If you are using easy connect naming:
– Verify that “EZCONNECT” is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
– Make sure the host, port and service name specified are correct.
– Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more infORMation on naming.

ORA-12171错误表明当尝试连接到一个数据库实例时,Oracle服务无法找到有效的连接标识。这可能是由于服务名不正确或不确定,或提供的TNS连接字符串不正确,或遇到了有关TNSNames.ora文件的问题,如文件路径不正确,文件权限不正确,文件不可达,文件名写错等情况。

官方解释

ORA-12171表明Oracle服务无法找到有效连接识别符。

这是一个可以恢复的错误,可能是由于服务名不正确或不确定,TNS连接字符串不正确,或者TNSNames.ora文件有问题,如文件不可达,文件名写错,文件路径不正确,文件权限不正确等。

常见案例

1、错误的服务名:如果使用的服务名与TNSNames.ora中的不一致,则客户端将无法正确识别服务,而ORA-12171将出现。

2、不正确的TNS连接字符串:如果使用的TNS连接字符串不正确,则ORA-12171错误将出现。

3、TNSNames文件路径不正确:如果在由客户端访问的工作站上没有正确设置TNSNames.ora文件路径,则ORA-12171错误将出现。

4、TNSNames文件权限不正确:如果TNSNames.ora文件的权限不正确,则ORA-12171错误将出现。

正常处理方法及步骤

1、确定服务名:首先,检查TNSNames.ora文件以确保该服务名存在。

2、确定TNS连接字符串:检查TNS连接字符串是否正确,如果需要修改,那么应当使用正确的TNS连接字符串来替换它。

3、确定TNSNames文件路径:向客户端提出修改TNSNames文件的路径,或者由DBA向客户端添加该路径的访问权限。

4、确定TNSNames文件权限:检查TNSNames文件的写入权限,由DBA给客户端添加写入权限。

--结束END--

本文标题: ORA-12171: TNS:could not resolve connect identifier: string ORACLE 报错 故障修复 远程处理

本文链接: https://lsjlt.com/news/542395.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作