开发者社区> 问答> 正文

连接远程数据库报错“ora-12154:tns:无法解析指定的连接标识符”?报错

刚装完了oracle,安装过程很顺利,可是在客户端就是连不上,看不出来有什么问题,请教各位大神

pl/sql developer 报错:“ora-12154:tns:无法解析指定的连接标识符”

装在CentOS 6.5 上的oracle 12C R1

两个机器可以互ping

# listener.ora Network Configuration File: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

listener.ora 文件如下:
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBANAME = venn.server.world)
      (ORACLE_HOME = /u01/app/oracle/product/12.1.0/dbhome_1)
      (SID_NAME = venn)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )
tnsnames.ora 文件如下:

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.


LISTENER_VENN =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
VENN =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.220.131)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = venn.server.world)
    )
  )

执行lsnrctl start 输出的最后一段:

<p>
	Services Summary...<br>

Service "venn" has 1 instance(s).
  Instance "venn", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully



展开
收起
爱吃鱼的程序员 2020-06-08 21:03:35 823 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    折腾了一下午,服务器的防火墙没关<divclass='ref'>

    引用来自“graz春江”的评论

    折腾了一下午,服务器的防火墙没关

    2020-06-08 21:03:52
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
神龙云服务器产品及技术深度解析 立即下载
弹性创造价值:基于ECS的最佳性价比实践解析 立即下载
又快又稳:阿里云下一代虚拟交换机解析 立即下载

相关镜像