本文介绍了Oracle 侦听器未运行且无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 lsnrctl status 命令时收到以下错误:

I am getting the following errors while from the lsnrctl status command:

C:\Users\pna105>lsnrctl stat

 LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-OCT-2014 17:53
 :55

 Copyright (c) 1991, 2010, Oracle.  All rights reserved.

 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
 TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   64-bit Windows Error: 2: No such file or directory
 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
 TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
 TNS-00511: No listener
 64-bit Windows Error: 61: Unknown error

重新启动前运行良好,但现在无法运行,而且我也无法访问我的 Oracle 主页.

It was working fine before restart but now it is not working and I also can't access my Oracle homepage.

我的 tnsnames.ora 是:

  ORACLE =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = Localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORACLE)
    )
   )

   LISTENER_ORACLE =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


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

我的 listener.ora 是:(由于括号错位添加几个空格而导致错误解决了 TNS-12518 问题)

My listener.ora is: (Here were error due to brackets misplaced adding few spaces resolved the problem TNS-12518)

   SID_LIST_LISTENER =
   (SID_LIST =
   (SID_DESC =
    (SID_NAME = ORACLE)
    (ORACLE_HOME = C:\app\PNA105\product\11.2.0\dbhome_1)
  )
  (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\app\PNA105\product\11.2.0\dbhome_1)
    (PROGRAM = extproc)
   )
   (SID_DESC =
  (SID_NAME = CLRExtProc)
  (ORACLE_HOME = C:\app\PNA105\product\11.2.0\dbhome_1)
  (PROGRAM = extproc)
  (ENVS = "EXTPROC_DLLS=ONLY:C:\app\PNA105\product\11.2.0\dbhome_1\bin\oraclr11.dll")
  )
  )

  LISTENER =
 (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  )
  )

  ADR_BASE_LISTENER = C:\app\PNA105

以下是lsnrctl start命令的输出

C:\Users\pna105>lsnrctl start

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-OCT-2014 18:26
:22

 Copyright (c) 1991, 2010, Oracle.  All rights reserved.

 Starting tnslsnr: please wait...

  TNS-12560: TNS:protocol adapter error
   TNS-00530: Protocol adapter error

以下是日志文件中需要的最后一个条目.

Following is the Last entry needed from log file.

 Started with pid=14784
 Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
 Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
 Listener completed notification to CRS on start

 09-OCT-2014 15:46:01 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=INL007306$))
(SERVICE_NAME=oracle)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57389)) *
establish * oracle * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
 TNS-00530: Protocol adapter error
 64-bit Windows Error: 203: Unknown error
 Dynamic address is already listened on (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)
 (HOST=127.0.0.1)(PORT=1521)))
 09-OCT-2014 15:46:06 * service_register * oracle * 0
 Thu Oct 09 15:46:11 2014
 09-OCT-2014 15:46:11 * service_update * oracle * 0
 09-OCT-2014 15:46:12 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=INL007306$))
 (SERVICE_NAME=oracle)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57393)) *
  establish * oracle * 0
 09-OCT-2014 15:46:12 * service_update * oracle * 0
 09-OCT-2014 15:46:13 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=INL007306$))
 (SERVICE_NAME=oracle)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57394)) *
 establish * oracle * 0

尝试解决 TNS-12518 并且监听器启动但仍然无法访问甲骨文主页

Tried to resolve TNS-12518 and listener started but still not able to accessOracle home page

lnsrctl stat 的输出

output of lnsrctl stat

C:\Users\pna105>lsnrctl stat

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 09-OCT-2014 17:16
:56

 Copyright (c) 1991, 2010, Oracle.  All rights reserved.

 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
 STATUS of the LISTENER
  ------------------------
 Alias                     LISTENER
 Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
 ction
 Start Date                09-OCT-2014 15:45:58
 Uptime                    0 days 1 hr. 30 min. 58 sec
 Trace Level               off
 Security                  ON: Local OS Authentication
 SNMP                      OFF
 Listener Parameter File   C:\app\PNA105\product\11.2.0\dbhome_1\network\admin\li
 stener.ora
 Listener Log File         c:\app\pna105\diag\tnslsnr\INL007306\listener\alert\lo
 g.xml
 Listening Endpoints Summary...
 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
  Services Summary...
  Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
  Service "ORACLE" has 2 instance(s).
  Instance "ORACLE", status UNKNOWN, has 1 handler(s) for this service...
  Instance "oracle", status READY, has 1 handler(s) for this service...
  Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
  Service "oracleXDB" has 1 instance(s).
  Instance "oracle", status READY, has 1 handler(s) for this service...

命令成功完成

推荐答案

1.检查环境变量(必须为系统设置,而不是为用户设置):

1.Check the Environment variables (must be set for System and not for user):

ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server
ORACLE_SID = XE

2.检查listener.ora中的定义是否正确

2.Check if you have the right definition in listener.ora

XE =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)

3.重启服务(Services > OracleServiceXE)

3.Restart the service (Services > OracleServiceXE)

之后您可能会看到一个名为 OracleXETNSListenerXE 的新服务.
已经有一个旧的 OracleXETNSListener.

After that you may see a new service called OracleXETNSListenerXE.
There is already an old OracleXETNSListener.

我同时启动了两者,然后我能够成功建立连接.

I started both and then I was able to make a successful connection.

如果一切都在运行但您仍然无法连接,请检查是否有错误:ORA-12557: TNS:protocol adapter not loadable.

If everything is running but you still can't connect, check if there is no error: ORA-12557: TNS:protocol adapter not loadable.

要更正错误,请返回环境变量,这次编辑名为:Path 的变量.确保 C:\oraclex\app\oracle\product\11.2.0\server\bin 位于开头的某个位置,绝对在指向不同版本 Oracle DB 的任何其他路径之前.

To correct the error go back to the Environment variables and this time edit the one called: Path. Be sure that C:\oraclexe\app\oracle\product\11.2.0\server\bin is somewhere at the beginning, definitely before any other path pointing to a different version of the Oracle DB.

这篇关于Oracle 侦听器未运行且无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 03:37