我正在开发一个使用Oracle XE 11g作为其RDBMS的应用程序。它工作了几个星期,但现在我开始收到有关连接被拒绝的错误消息。
我重启了系统,但没有帮助。我卸载了XE,删除了所有剩余的文件(甚至从注册表中删除)并重新安装它。现在我收到另一条错误消息:
侦听器拒绝连接时出现以下错误:ORA-12505, TNS:监听器当前不知道connect中给出的SID 描述符
我已经读过这个错误,其他人建议在listener.ora文件中添加一个新的SID:
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
如果我这样做,我会收到另一条错误消息:
ORA-01034:ORACLE不可用ORA-27101:共享内存领域 不存在
我的配置文件是: 的的listener.ora
SID_LIST_LISTENER = (SID_LIST =
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
) )
LISTENER = (DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = AAROLD.in.mycompany.com)(PORT = 1521))
) )
DEFAULT_SERVICE_LISTENER = (XE)
的tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = AAROLD.in.mycompany.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
lsnrctl status 返回:
LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 19-M┴RC. -2013 15:12:24
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
Start Date 19-M┴RC. -2013 15:01:12
Uptime 0 days 0 hr. 11 min. 11 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\AAROLD\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AAROLD.in.mycompany.com)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
你知道可能出现什么问题吗?我不是Oracle专家,所以我在这里完全处于黑暗中。
答案 0 :(得分:13)
我有完全相同的问题,花了将近4个小时试图找到并回答,最后添加
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
到我的listener.ora并重启两个XE服务解决了这个问题。我在Windows 7 x64上使用11.2.0(XE),直到昨天都没有任何故障。今天早上重启我的电脑导致听众找不到SID。
现在我正在备份listener.ora和tnsnames.ora。
顺便说一句,忘记提及我将bob.mycompany.com中的文件中的主机名更改为localhost。答案 1 :(得分:11)
在Windows 7 64位,Orcale XE 11上 我的OracleXXETNSListener服务没有运行,并在我尝试启动时立即终止。
(SID_DESC =(SID_NAME = XE)(ORACLE_HOME = C:\ oraclexe \ app \ oracle \ product \ 11.2.0 \ server))
到我的
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\listener.ora
将主机名更改为 localhost
重新启动OracleServiceXE服务解决了这个问题。
完整的 listener.ora 部分如下所示:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\servers\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\servers\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\servers\oraclexe\app\oracle\product\11.2.0\server)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
答案 2 :(得分:3)
我有类似的问题,我通过删除" IPC"来自listener.ora和tnsnames.ora的行。
在listener.ora
,我删除了:
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
在tnsnames.ora
,我删除了:
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
这可能是一种矫枉过正,但几个小时后它终于得到了修复!
答案 3 :(得分:2)
您的Oracle数据库已关闭。启动时可能会遇到一些问题。
转到命令提示符并键入:
SQL> sqlplus / as sysdba
如果收到“连接到空闲实例”的消息,请键入
SQL>的启动强>
让我知道你得到的信息。如果在SqlPlus启动时没有收到“连接到空闲实例”消息,则输入:
SQL> 设置行80页50
SQL> 从v $ database中选择*;
并在此处发布输出。
答案 4 :(得分:1)
我遇到了同样的问题,错误是我更改了我的机器名称。这是通过编辑listener.ora并重命名HOST来解决的:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname_of_my_machine)(PORT = 1521))
)
)