安装ODP.net后如何解决错误ORA-12154? [英] Getting error ORA-12154 after installing ODP.net how to solve?

查看:87
本文介绍了安装ODP.net后如何解决错误ORA-12154?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装ODP.net后出现以下错误。



Am getting below error after installing ODP.net.

ORA-12154: TNS:could not resolve the connect identifier specified





在安装ODP.net之前,我可以使用plsql developer连接数据库。但运行.net应用程序需要ODP.net所以我安装了ODP.net.But安装ODP.net后无法使用plsql develper和.net代码连接数据库。我得到的错误是



Before installing ODP.net i was able to connect with database using plsql developer.But ODP.net is required to run .net application so i installed ODP.net.But after installing ODP.net am unable to connect with database using plsql develper and .net code. Error am getting is

"ORA-12154: TNS:could not resolve the connect identifier specified "





如果有人知道解决方案,请告诉我。



Let me know if anyone knows the solution for this.

推荐答案

原因:使用连接标识符请求连接到数据库或其他服务,并指定连接标识符无法使用配置的命名方法之一将其解析为连接描述符。例如,如果使用的连接标识符类型是网络服务名称,则无法在命名方法存储库中找到网络服务名称,或者无法找到或到达存储库。



动作:

- 如果您使用的是本地命名(TNSNAMES.ORA文件):



- 确保TNSNAMES被列为Oracle Net配置文件中的NAMES.DIRECTORY_PATH参数的值之一(SQLNET.ORA)



- 验证TNSNAMES.ORA文件存在且位于正确的目录中并且可以访问。



- 检查用作连接标识符的网络服务名称是否存在于TNSNAMES.ORA文件中。



- 确保TNSNAMES.ORA文件中的任何位置都没有语法错误。寻找无与伦比的括号或流浪汉字符。 TNSNAMES.ORA文件中的错误可能使其无法使用。



- 如果您使用目录命名:



- 验证LDAP是否列为Oracle Net配置文件(SQLNET.ORA)中NAMES.DIRETORY_PATH参数的值之一。



- 验证LDAP目录服务器已启动且可以访问。



- 验证在目录中是否配置了用作连接标识符的网络服务名称或数据库名称。



- 通过指定完全限定的网络服务名称或完整的LDAP DN作为连接标识符来验证所使用的默认上下文是否正确



- 如果您使用简单连接命名:



- 确认EZCONNECT被列为NAMES的值之一Oracle Net配置文件中的.DIRETORY_PATH参数(SQLNET.ORA)。



- 确保指定的主机,端口和服务名称正确。



- 尝试在引号中包含连接标识符。有关命名的更多信息,请参阅Oracle Net Services管理员指南或Oracle操作系统特定指南。
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.


这篇关于安装ODP.net后如何解决错误ORA-12154?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆