🧩 How to Fix ORA-12514: TNS Listener Does Not Currently Know of Service
The ORA-12514 error occurs when the Oracle client tries to connect to a database, but the listener does not recognize the requested service. This prevents users or applications from establishing a connection, even if the listener is running. Understanding how to troubleshoot this error is essential for DBAs to ensure uninterrupted database connectivity.
Step 1: Check Listener Status
Run the following command on the database server:
lsnrctl status
Verify that the service you want to connect to appears under Services Summary. If it does not, the listener is unaware of the database service.
Step 2: Verify Database Service Registration
Ensure that the database instance is properly registered with the listener:
ALTER SYSTEM REGISTER;
This forces the database to register its services with the listener immediately.
Step 3: Check Service Name in Connection String
Confirm that your connection string uses the correct service name, not the SID:
sqlplus username/password@//hostname:port/service_name
Using the SID instead of the service name can trigger ORA-12514.
Step 4: Check Listener Configuration
Examine listener.ora and ensure the service names match those in the database:
$ORACLE_HOME/network/admin/listener.ora
Make sure the HOST and PORT are correct, and no typos exist in the service name.
Step 5: Restart Listener if Needed
If services are still not recognized, restart the listener:
lsnrctl stop
lsnrctl start
Then re-run lsnrctl status to verify the service is now listed.
Step 6: Prevent Future Occurrences
Ensure LOCAL_LISTENER parameter in the database points to the correct listener.
Monitor listener logs regularly to detect registration issues.
Configure the listener to start automatically with the database server.
Conclusion
ORA-12514 errors occur when the listener does not recognize the database service. By verifying listener status, ensuring proper service registration, correcting connection strings, and monitoring the listener, DBAs can quickly resolve this error and maintain stable database connections.

Comments
Post a Comment