Home > Database > Mysql Tutorial > body text

TORA-12154 和 TNS-03505:无法解析名称

WBOY
Release: 2016-06-07 17:23:55
Original
1115 people have browsed it

最近在安装完Oracle Developer Suite之后,就无法登录系统,输入帐号登录发生错误:ORA-12154:TNS:无法解析指定的连接标帜符。

最近在安装完Oracle Developer Suite之后,就无法登录系统,输入帐号登录发生错误:ORA-12154:TNS:无法解析指定的连接标帜符。

从网上查看说一般是因为 配置文件中没有对应的实例名,然后我就输入C:/tnsping myoracle(我的ora实例名),查看tnsnames.ora和sqlnet.ora是否配置正确,结果报错,提示:TNS-03505:无法解析名称 说明配置文件有误。

然后我就查看%Oracle_Home%/Db_1/NetWork/admin/TNSNAMES.ORA 文件,发现其中包含我需要登录的实例名。我在尝试tnsping命令,发现其查看到的参数文件sqlnet.ora不是我默认安装的oracle下面的sqlnet.ora,,而是Oracle Developer Suite目录下NetWork文件夹下面的sqlnet.ora文件,把安装目录下的tnsnames.ora中的实例配置内容拷贝过去,OK.

MYORACLE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = MYORACLE)
    )
  )

至于为什么会修改为使用那个目录下的参数文件,还没有研究怎么处理。先记下处理过程。

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!