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)

    )

  )