ORA-12541: TNS:no listener
The client reached the host, but nothing is listening on that port. The listener is stopped, or the port in your connection is wrong. Start the listener or correct the port.
What ORA-12541 means
The listener is the process that accepts new connections and passes them to the database. ORA-12541 means the host answered and refused the connection on that port. So the network path works, which rules out most firewall problems. Newer releases word the message as Cannot connect. No listener at host … port ….
Common causes of ORA-12541
- The listener is not running, for example after a server restart.
- A wrong port in the connection or in tnsnames.ora.
- A wrong host: the server you reached is not the database server.
- The listener listens on another address, such as localhost only.
How to fix ORA-12541
- On the server, check it:
lsnrctl status. - Start it if needed:
lsnrctl start. On Windows, check the listener service too. - Compare the port and address with
listener.ora. - Once it is running, the database should register within a minute;
ALTER SYSTEM REGISTERspeeds this up.
ORA-12541 example
On the database server:
lsnrctl status
lsnrctl start
sqlplus / as sysdba
SQL> ALTER SYSTEM REGISTER;
In SQLlightspeed
When a statement fails, SQLlightspeed’s error panel shows the error code with a plain-language explanation and a suggestion for what to do next, together with Oracle’s own message and a link to Oracle’s documentation — for this error and dozens of other common ones.
Related errors
ORA-12514ORA-12170ORA-12154 All Oracle errors →
Oracle documentation for ORA-12541. Oracle is a registered trademark of Oracle Corporation. SQLlightspeed is not affiliated with Oracle.