ORA-12504:TNS:侦听器未在CONNECT_DATA中获得SID

时间:2016-02-23 05:34:05

标签: oracle weblogic listener tnsnames sid

我是oracle的新手并尝试使用oracle weblogic启动Web应用程序。 该应用程序正常,但我一直有这个错误:ORA-12504:TNS:listener was not given the SID in CONNECT_DATA

我在网上搜索了答案,发现这对像我这样的新手来说是一个非常普遍的问题。 我在http://ora-12xyz.com/error/ORA-12504找到了一些东西,说明解决这个问题的方法是:

  • 使用有效的服务名称在LISTENER.ORA中配置DEFAULT_SERVICE参数。使用reload []重新加载侦听器参数文件。这应该由LISTENER管理员完成。

但我真的不知道如何或在何处在listener.ora文件中设置它。

请在我的listener.ora

下面找到
# listener.ora Network Configuration File: D:\app\saduarte\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 = D:\app\saduarte\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\app\saduarte\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = MAN-L3JFGR32.misys.global.ad)(PORT = 1521))
    )
  )
ADR_BASE_LISTENER = D:\app\saduarte

我的tnsname.ora位于下方,以防需要解决此问题。

# tnsnames.ora Network Configuration File: D:\app\saduarte\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )
TIPLUS2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = MAN-L3JFGR32.misys.global.ad)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = TIPLUS2)
    )
  )

这是我在cmd上执行lsnrctl status所得到的:

C:\Users\saduarte>lsnrctl status

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-FEB-2016 11:55
:43

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 32-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date                23-FEB-2016 11:35:33
Uptime                    0 days 0 hr. 20 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   D:\app\saduarte\product\11.2.0\dbhome_1\network\admin\
listener.ora
Listener Log File         d:\app\saduarte\diag\tnslsnr\MAN-L3JFGR32\listener\ale
rt\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=MAN-L3JFGR32.misys.global.ad)(PORT=1
521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 3 handler(s) for this service...
Service "TIPLUS2XDB" has 1 instance(s).
  Instance "tiplus2", status READY, has 1 handler(s) for this service...
Service "tiplus2" has 1 instance(s).
  Instance "tiplus2", status READY, has 1 handler(s) for this service...
The command completed successfully

这是通过执行lsnrctl service

C:\Users\saduarte>lsnrctl service
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-FEB-2016 11:58
:29

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 3 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
      "ORACLE SERVER" established:0 refused:0 current:0 max:25 state:ready
         CLRExtProc
         (ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\NTN_1CC0_E79D7B5F.ORA))
      "ORACLE SERVER" established:0 refused:0 current:0 max:25 state:ready
         CLRExtProc
         (ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\NTN_1CC0_E79D7B5F.ORA))
Service "TIPLUS2XDB" has 1 instance(s).
  Instance "tiplus2", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: MAN-L3JFGR32, pid: 3052>
         (ADDRESS=(PROTOCOL=tcp)(HOST=MAN-L3JFGR32.misys.global.ad)(PORT=61055))
Service "tiplus2" has 1 instance(s).
  Instance "tiplus2", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:58 refused:0 state:ready
         LOCAL SERVER
The command completed successfully

非常感谢

0 个答案:

没有答案