首页 > 数据库技术 > 详细

连接oracle时localhost可以ip地址不可以

时间:2015-06-11 00:32:45      阅读:307      评论:0      收藏:0      [点我收藏+]
  1. 在本机安装了oracle,使用sqlplus和plsqldev连接的时候,tnsname.ora中host写的是localhost,此时连接oracle都没有任何问题,但是外机连接本机,和tnsname.ora中host写成ip地址(192.168.1.110)是,报错ora-12547,没有监听等

  2. 解决问题,oracle自带管理工具,程序-》oracle-oracle...-》配置和移植工具-》Net Manager中找到本地,LISTENER,添加一个监听服务地址,然后重启oracle监听服务,然后就可以使用localhost和ip地址对oracle进行访问了

  3. LISTENER.ORA文件

    

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

    )

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.110)(PORT = 1521))

    )

  )


TNSNAME.ORA文件

ORCL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )


  

ORCLIP =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.110)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )


本文出自 “Bad-Kbase” 博客,请务必保留此出处http://bad51men.blog.51cto.com/3141086/1660466

连接oracle时localhost可以ip地址不可以

原文:http://bad51men.blog.51cto.com/3141086/1660466

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!