linux上安装oracle后,客户端连接报出ORA-12505的解决方法

linux上安装了oracle11gR2,配置好监听后可用,由于网络原因修改ip后再次启动客户端连接时提示连接失败,把/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora中HOSTNAME改为固定ip后再次连接,出现ORA-12505异常


状态: 失败 -测试失败: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor


查了下资料,把listener.ora中的sid重新指定,改为如下后,再次连接正确


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

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.104)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
(SID_LIST =
    (SID_DESC =
    #  (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = orcl)
    )
)
ADR_BASE_LISTENER = /home/oracle/app


你可能感兴趣的:(数据库操作,oracle)