正在加载...

PS:前几天一台项目开发使用的Oracle11g服务器重启系统之后,出现了几个莫名的报错,下面是其中一个,已解决。

$ lsnrctl start

报错提示:

The listener supports no services
The command completed successfully

如图所示:


这样启动后远程连接会报错:
oracle ORA-12514:TNS:listener does not currently know of service requested in connect descriptor

问题原因:数据库实例没注册到listener


解决方法一:

在listener.ora里面添加了一行

SID_LIST_LISTENER =  
(SID_LIST =  
  (SID_DESC =  
  (GLOBAL_DBNAME = orcl)
  (SID_NAME = orcl)
  )
)

注:里面的orcl根据你安装的数据库实例名确定,我用此法解决了这个报错。

解决方法二:

登录数据库:
$sqlplus / as sysdba
显示服务名:
SQL>show parameter service_names
强制注册服务:
SQL>alter system register;
查看监听状态:
$lsnrctl status

博主新开公众号,欢迎关注,二维码如下:


							

: http://www.ha97.com/4788.html

本文相关评论 - 才 10 条评论
wanlt_software
2012-12-11 09:30:16
Internet Explorer 7.0 Internet Explorer 7.0 Windows XP Windows XP

谢谢分享,用第一个方法解决了问题。

sdf
2013-01-14 14:04:18
Google Chrome 21.0.1180.89 Google Chrome 21.0.1180.89 Windows XP Windows XP

谢谢分享,用第一个方法解决了问题

sdf
2013-01-14 14:05:00
Google Chrome 21.0.1180.89 Google Chrome 21.0.1180.89 Windows XP Windows XP

用第一个方法 解决 了问题

路人甲
2013-02-07 15:01:00
Google Chrome 25.0.1364.5 Google Chrome 25.0.1364.5 Windows XP Windows XP

能不能贴下 listener.ora 完整版

wxb_tnt
2013-04-30 16:55:55
Konqueror 4.3 Konqueror 4.3 Red Hat Enterprise Linux 6 Red Hat Enterprise Linux 6

用第一个方法 解决了,谢谢!

tjn6108
2013-08-05 18:42:16
Google Chrome 21.0.1180.89 Google Chrome 21.0.1180.89 Windows 8 x64 Edition Windows 8 x64 Edition

两种方法都试过了 还是一样,是哪没配置好

qpzm256
2013-09-07 10:50:24
Google Chrome 21.0.1180.89 Google Chrome 21.0.1180.89 Windows XP Windows XP

用了第二个方法,解决了,太赞了

iceaugust
2014-09-26 13:22:07
Internet Explorer 8.0 Internet Explorer 8.0 Windows 7 Windows 7

第一个方法好用,谢谢!

2017-02-10 17:51:44
Google Chrome 45.0.2454.85 Google Chrome 45.0.2454.85 Windows 8.1 x64 Edition Windows 8.1 x64 Edition

第一个方法的listener里面已经自带了。可是第二个我怕弄了就会影响我的整体配置

游客
2018-08-07 20:50:34
Google Chrome 67.0.3396.62 Google Chrome 67.0.3396.62 Windows 7 x64 Edition Windows 7 x64 Edition

谢谢 第一个方法好用,谢谢!