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?
First check the tnsnames. ora file and ensure that it points to the correct server and port. If the Forms server is on another machine, test the TNS resolve with tnsping from the command prompt. Finally, check the listener.
ORA-12541: TNS:no listener. 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.
Action: Wait a moment and try to connect a second time. Check which services are currently known by the listener by executing: lsnrctl services. Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener.
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%\network\admin\listener.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
I also faced the same problem but I resolved the issue by starting the TNS listener in control panel -> administrative tools -> services ->oracle TNS listener start.I am using windows Xp and Toad to connect to Oracle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With