我是Oracle数据库的新手,但我有一个问题,现在我的数据库服务器(server1)监听器和数据库实例运行正常我可以使用sqlplus连接到这个数据库,但是当我使用其他服务器连接到数据库时,我检查TNS配置是否正确但是系统说错误:ORA-12541:TNS:没有监听器
我的数据库是Oracle 10gR2
那么我该如何解决这个问题呢?
Mik*_*ren 63
您需要设置oracle以侦听所有IP地址(默认情况下,它只侦听localhost连接.)
listener.ora
该文件位于:
%ORACLE_HOME%\network\admin\listener.ora
.替换 localhost
为 0.0.0.0
# ...
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
)
)
# ...
Run Code Online (Sandbox Code Playgroud)
Windows:WinKey+r
services.msc
Run Code Online (Sandbox Code Playgroud)Linux(CentOs):
sudo systemctl restart oracle-xe
Run Code Online (Sandbox Code Playgroud)我也面临同样的问题,但我通过在控制面板中启动TNS监听器 - >管理工具 - >服务 - > oracle TNS监听器启动来解决问题.我正在使用Windows Xp和Toad连接到Oracle.
根据oracle在线文档
ORA-12541:TNS:没有倾听者
Cause: The connection request could not be completed because the listener is not running.
Action: Ensure that the supplied destination address matches one of the addresses used by
the listener - compare the TNSNAMES.ORA entry with the appropriate LISTENER.ORA file (or
TNSNAV.ORA if the connection is to go by way of an Interchange). Start the listener on
the remote machine.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
373936 次 |
最近记录: |