Oracle 重新启动服务器后出现ORA-12514错误

Oracle 重新启动服务器后出现ORA-12514错误,oracle,oracle11g,tnsnames,Oracle,Oracle11g,Tnsnames,我在服务器上安装了oracle 11g,.Net oracle客户端将访问数据库。 直到昨天,我还在使用以下连接字符串从客户端进行连接: User ID=dbcplas;Password=pwd123;Data Source=(DESCRIPTION = (ADDRESS =(PROTOCOL = TCP)(HOST = 172.17.26.7)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl.cplas3

我在服务器上安装了oracle 11g,.Net oracle客户端将访问数据库。
直到昨天,我还在使用以下连接字符串从客户端进行连接:

User ID=dbcplas;Password=pwd123;Data Source=(DESCRIPTION = (ADDRESS =(PROTOCOL = TCP)(HOST = 172.17.26.7)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl.cplas3.com)))  
直到昨天,我还能够在同一个客户机上使用Oracle SQL Developer。
今天早上我们重新启动了服务器进行维护。重新启动服务器后,我无法从客户端.Net应用程序或sqldeveloper登录。
我可以通过服务器系统的sql plus登录。
除此之外,我无法通过任何其他方式登录。
服务器端sql开发人员也不工作。
我已从服务器提供以下详细信息:

lsnrctl服务:

    C:\Users\Administrator>lsnrctl services

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2014 15:
:45

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.26.7)(PORT=1521
)
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
The command completed successfully
lsnrctl状态:

C:\Users\Administrator>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2014 15:20
:42

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.26.7)(PORT=1521))
)
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date                07-JAN-2014 13:17:40
Uptime                    0 days 2 hr. 3 min. 7 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   E:\app\administrator\product\11.2.0\dbhome_1\network\a
dmin\listener.ora
Listener Log File         e:\app\administrator\diag\tnslsnr\cplas3\listener\aler
t\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.17.26.7)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully  
# listener.ora Network Configuration File: E:\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 = E:\app\administrator\product\11.2.0)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

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

ADR_BASE_LISTENER = E:\app\administrator  
C:\Users\Administrator>tnsping orcl.cplas3.com

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
014 15:30:44

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

Used parameter files:
E:\app\administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name
C:\Users\Administrator>tnsping orcl

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
014 15:31:22

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

Used parameter files:
E:\app\administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.2
6.7)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.cpl
as3.com)))
OK (1560 msec)
LISTENER.ORA

C:\Users\Administrator>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2014 15:20
:42

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.26.7)(PORT=1521))
)
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date                07-JAN-2014 13:17:40
Uptime                    0 days 2 hr. 3 min. 7 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   E:\app\administrator\product\11.2.0\dbhome_1\network\a
dmin\listener.ora
Listener Log File         e:\app\administrator\diag\tnslsnr\cplas3\listener\aler
t\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.17.26.7)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully  
# listener.ora Network Configuration File: E:\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 = E:\app\administrator\product\11.2.0)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

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

ADR_BASE_LISTENER = E:\app\administrator  
C:\Users\Administrator>tnsping orcl.cplas3.com

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
014 15:30:44

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

Used parameter files:
E:\app\administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name
C:\Users\Administrator>tnsping orcl

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
014 15:31:22

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

Used parameter files:
E:\app\administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.2
6.7)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.cpl
as3.com)))
OK (1560 msec)
SQLNET.ORA

# sqlnet.ora Network Configuration File: E:\app\administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to 
# install "Software Only", this file wont exist and without the native 
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


TNSFILES.ORA

    # tnsnames.ora Network Configuration File: E:\app\administrator\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)
        )
      )

    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.26.7)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl.cplas3.com)
        )
      ) 
tnsping结果-orcl.cplas3.com

C:\Users\Administrator>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2014 15:20
:42

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.26.7)(PORT=1521))
)
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date                07-JAN-2014 13:17:40
Uptime                    0 days 2 hr. 3 min. 7 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   E:\app\administrator\product\11.2.0\dbhome_1\network\a
dmin\listener.ora
Listener Log File         e:\app\administrator\diag\tnslsnr\cplas3\listener\aler
t\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.17.26.7)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully  
# listener.ora Network Configuration File: E:\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 = E:\app\administrator\product\11.2.0)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

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

ADR_BASE_LISTENER = E:\app\administrator  
C:\Users\Administrator>tnsping orcl.cplas3.com

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
014 15:30:44

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

Used parameter files:
E:\app\administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name
C:\Users\Administrator>tnsping orcl

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
014 15:31:22

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

Used parameter files:
E:\app\administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.2
6.7)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.cpl
as3.com)))
OK (1560 msec)
tnsping结果-orcl

C:\Users\Administrator>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2014 15:20
:42

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.26.7)(PORT=1521))
)
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date                07-JAN-2014 13:17:40
Uptime                    0 days 2 hr. 3 min. 7 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   E:\app\administrator\product\11.2.0\dbhome_1\network\a
dmin\listener.ora
Listener Log File         e:\app\administrator\diag\tnslsnr\cplas3\listener\aler
t\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.17.26.7)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully  
# listener.ora Network Configuration File: E:\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 = E:\app\administrator\product\11.2.0)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

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

ADR_BASE_LISTENER = E:\app\administrator  
C:\Users\Administrator>tnsping orcl.cplas3.com

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
014 15:30:44

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

Used parameter files:
E:\app\administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name
C:\Users\Administrator>tnsping orcl

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
014 15:31:22

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

Used parameter files:
E:\app\administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.2
6.7)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.cpl
as3.com)))
OK (1560 msec)
错误:
来自.Net应用程序:
ORA-12514 TNS:侦听器当前不知道连接描述符中的服务请求

为什么
lsnrctl状态
不显示orcl的状态??
我试着启动orcl服务。但是它的说法已经开始了。

可能有什么问题?

从评论中可以看出,可能是试图使用新网络适配器的动态IP,因此它使用的地址与侦听器使用的地址不同。解决此问题的最简单方法可能是手动设置该参数:

alter system set local_listener = '(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.26.7)(PORT=1521))' scope=memory;
alter system register;
或者我认为您可以使用较短的版本,但我现在无法验证:

alter system set local_listener = '172.17.26.7:1521' scope=memory;
alter system register;
如果这样做有效-也就是说,
lsnrctl服务
现在显示
orcl
-并且您对此满意,请将
内存
更改为
两个
,然后重新执行,以便在下一次数据库重启期间保持


另一个版本是在
tnsnames.ora
中定义侦听器,然后将该别名用于
本地\u侦听器
值;如果静态IP曾经发生过更改,这可能会使更改变得更容易,因为您只需要更改
listener.ora
tnsnames.ora
(当然还有您的所有客户机),就不必直接修改DB参数。这可能只有在不同的人管理数据库和那些文件时才有用,这不太可能;但是可能会更整洁一些。

如果您可以通过SQL*连接,并且数据库已经启动,并且应该已经注册,即使它在侦听器之前启动;但是,您可以通过
更改系统寄存器
强制执行该操作。试试看
lsnrctl
现在是否显示服务。如果没有,您的
local_listener
参数设置为什么?@AlexPoole我尝试了lsnrctl。。这不是orcl服务。在local_listener中,“value”列中没有值。我们需要设置它吗;服务器名称是否仍解析为
172.17.26.7
?(如果查看日志文件,
e:\app\administrator\diag\tnslsnr\cplas3\listener\aler t\log.xml
,您可能会看到它试图使用的服务器名称)。您可以将其设置为使用IP地址,但这不是必需的。我假设IP是静态的,不是由DHCP分配的?实际上,当它以前工作时,IP是静态的。但在早上重新启动之前,我们试图在动态ip中配置另一个网络适配器以用于其他目的。从那时起,它只是在给问题。现在我该怎么办?我已经试过了第一个命令。它现在运转良好。我是否需要运行alter system set local_listener='(地址=(协议=TCP)(主机=172.17.26.7)(端口=1521))'范围=两者;这有什么用?它让它持续下去。运行
scope=memory
版本时,它只影响正在运行的实例。当数据库重新启动时,它将忘记这一点,并返回
spfile
获取其参数。如果执行
scope=both
(或者此时执行
scope=spfile
),则它也会将更改的参数写入
spfile
;因此,下次重新启动时,它仍将使用该设置。