我是 Oracle 数据库的新手,但我遇到了一个问题.在我的数据库服务器 (server1) 侦听器和数据库实例上运行正常,我可以使用 sqlplus
连接到这个数据库.当我使用其他服务器连接到数据库时,我检查了 TNS 配置,它是正确的,但系统说:
错误:ORA-12541: TNS: 没有侦听器
我的数据库是 Oracle 10gR2
那么我该如何解决这个问题?
需要设置oracle监听所有ip地址(默认只监听localhost连接)
listener.ora
该文件位于:
%ORACLE_HOME%
etworkadminlistener.ora
.替换 localhost
with 0.0.0.0
# ...听者 =(DESCRIPTION_LIST =(描述 =(地址 = (协议 = IPC)(密钥 = EXTPROC1521))(地址 = (协议 = TCP)(主机 = 0.0.0.0)(端口 = 1521))))# ...
Windows:WinKey + r
services.msc
Linux (CentOs):
sudo systemctl restart oracle-xe
I am new on Oracle database, but I have one issue.
On my Database server (server1) listener and database instance run correctly and I can use sqlplus
to connect to this DB.
When I connect to database by using other server, I check the TNS configuration and it is correct but system says:
ERROR: ORA-12541: TNS:no listener
My database is Oracle 10gR2
So how can I solve this issue?
You need to set oracle to listen on all ip addresses (by default, it listens only to localhost connections.)
listener.ora
This file is located in:
%ORACLE_HOME%
etworkadminlistener.ora
.Replace localhost
with 0.0.0.0
# ...
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
)
)
# ...
Windows: WinKey + r
services.msc
Linux (CentOs):
sudo systemctl restart oracle-xe
这篇关于Oracle 客户端 ORA-12541:TNS:无侦听器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!