解决oracle11g数据库监听连接不上问题

java连接数据库报错12514,无法识别监听,但是PL客户端可以连接

oracle 监听 添加ip
同时修改tnsnames.ora、listener.ora将这两个文件中HOST后面的主机都修改为127.0.0.1然后重启OracleServiceXE、OracleXETNSListener服务

listener.ora文件修改为

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\Oracle11gXE\oracle\product\11.0.2\server)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\Oracle11gXE\oracle\product\11.0.2\server)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = XE)
      (ORACLE_HOME = D:\Oracle11gXE\oracle\product\11.0.2\server)
    )
/*黄色字体部分即为新加的数据库实例描述,注意该实例那样加(PROGRAM = extproc),否则会报“ORA-28547: TNS: 连接服务器失败,可能是Net8管理错误。”*/
  )
 
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
  )
 
DEFAULT_SERVICE_LISTENER = (XE)

 

你可能感兴趣的:(解决oracle11g数据库监听连接不上问题)