aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

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

TNS-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.

请先 登录 后评论

1 个回答

小智
TNS-12171:TNS:无法解析连接标识符:string,
.原因:使用连接标识符请求与数据库或其他服务的连接,并且指定的连接标识符无法使用配置的命名方法之一解析为连接描述符。例如,如果所使用的连接标识符的类型是网络服务名称,则无法在命名方法存储库中找到网络服务名称,否则无法找到或到达存储库。,
.行动:,
.- 如果您使用本地命名(TNSNAMES.ORA文件):,
.,
.- 确保“TNSNAMES”被列为Oracle Net配置文件(SQLNET.ORA)中的NAMES.DIRECTORY_PATH参数的值之一,,
.,
.- 验证TNSNAMES.ORA文件是否存在并且位于正确的目录中,并且可以访问。,
.,
.- 检查用作连接标识符的网络服务名称是否存在于TNSNAMES.ORA文件中。,
.,
.- 确保TNSNAMES.ORA文件中的任何位置没有语法错误。寻找不匹配的括号或杂散字符。TNSNAMES.ORA文件中的错误可能会使其无法使用。,
.,
.- 如果您正在使用目录命名:,
.,
.- 验证“LDAP”是否列为Oracle Net配置文件(SQLNET.ORA)中的NAMES.DIRETORY_PATH参数的值之一。,
.,
.- 验证LDAP目录服务器是否已启动并且可以访问。,
.,
.- 验证用作连接标识符的网络服务名称或数据库名称是否在目录中配置。,
.,
.- 通过指定完全限定的网络服务名称或完整的LDAP DN作为连接标识,验证所使用的默认上下文是否正确,
.,
.- 如果您使用简单连接命名:,
.,
.- 验证“EZCONNECT”是否列为Oracle Net配置文件(SQLNET.ORA)中NAMES.DIRETORY_PATH参数的值之一。,
.,
.- 确保指定的主机,端口和服务名称正确。,
.,
.- 尝试将连接标识符包含在引号中。有关命名的更多信息,请参阅“Oracle Net Services管理员指南”或“Oracle操作系统特定指南”。,
.,
.
请先 登录 后评论