oracle 数据库 错误 ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务 解决办法

当oracle 报12584错误时

一、去把这tnsnames.ora,listener.ora两个文件里面的localhost 全部改为127.0.0.1 包括你连接数据库用的工具,

改完之后,重启监听服务。(重启监听服务可以从任务管理器--->服务--->Oracle???Listenter 停止,然后启动)



如果没有效果,则继续下面操作

增加一段代码至tnsnames.ora配置文件:

      (SID_DESC =
    (GLOBAL_DBNAME = ORCL)
    (ORACLE_HOME = F:\app\Administrator\product\11.2.0\dbhome_1)
    (SID_NAME = ORCL)
    )

如图所示(记得改路径):



每次操作完,记得重启监听服务。还不行的话直接用我的配置文件把。

#配置文件: listener.ora

# listener.ora Network Configuration File: F:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = F:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:F:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
      (SID_DESC =
    (GLOBAL_DBNAME = ORCL)
    (ORACLE_HOME = F:\app\Administrator\product\11.2.0\dbhome_1)
    (SID_NAME = ORCL)
    )
  )
LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
  )
ADR_BASE_LISTENER = F:\app\Administrator


分割线-------------------------------------------------------------------------------------------------

#配置文件:tnsnames.ora

# tnsnames.ora Network Configuration File: F:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.


LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))




ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )


ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值