Oracle Listeners: Your Database's Watchman
In the world of Oracle databases, a listener acts like a doorman, managing incoming connection requests from clients.
In the world of Oracle databases, a listener acts like a doorman, managing incoming connection requests from clients.
Configuring Listener can be a tough job on a rare day & frustrating enough to pull your hair out. Especially when you are facing the below errors.
ORA-12170: TNS:Connect timeout occurred
OR
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oravm19c.practice.com)(PORT=1521)))
TNS-12535: TNS:operation timed out
TNS-12560: TNS:protocol adapter error
TNS-00505: Operation timed out
When you don't want any user to connect to database, you can simply restrict your instance from any incoming connection. But if you don't know this concept and you have come across the below error, it means your database is in sort of maintenance mode and you need to disable it to enable users to connect to it via listener.
Note: Maintenance mode still allows users to connect to database without listener, of course you can only do it when you are on DB server and you are not using listener for DB connection i.e. no use of @SID.
When listener is not aware of your database, you might come across the below error when trying to connect to a database.
PS C:\Users\parvi> sqlplus sys@practice as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jan 7 21:16:26 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
You'll need to make your instance known to listener in this case, there are multiple ways to do this, but I'll specify the 2 easiest ones which will help you fix this error.