Database connection issues are a nightmare—especially when everything seems configured perfectly, yet the application still refuses to connect. One Oracle error that shows up frequently, both for DBAs and developers, is:
ORA-12514: TNS Listener Does Not Currently Know of Service Requested in Connect Descriptor
If you’ve landed here because you’re facing this problem, you’re not alone. This is one of the most searched Oracle networking errors, and fortunately, also one of the easiest to fix once you understand what’s happening in the background.
In this full guide, we’ll break down the error, explain its causes in simple language, and give you step-by-step solutions that work in real production environments.
What ORA-12514 Actually Means (Simple Explanation)
Every time you try to connect to an Oracle database—whether from SQL*Plus, SQL Developer, an application, or a script—a request is sent to the Oracle Listener. The listener is like a receptionist: its job is to accept incoming connections and pass them to the correct database service.
ORA-12514 means that:
The listener is working, but it does NOT recognize the service name you are trying to connect to.
It’s like walking into a hotel and asking for a guest the receptionist has never heard of. The receptionist is there, listening, but the guest name does not match any on the list.
Why ORA-12514 Happens (Real Causes)
Here are the most common reasons why the listener doesn’t recognize the service name:
1. The service name is wrong
This is the #1 cause.
- Typo in the service name
- Using SID when SERVICE_NAME is required
- Wrong or outdated tnsnames.ora entry
2. Database is not registered with the listener
Even if the DB is up, it may not have updated the listener yet.
3. The DB is not open
If the instance is in:
- NOMOUNT
- MOUNT
…it will not register its services.
4. Static registration missing
This is common in:
- Data Guard
- Application servers
- Advanced RAC setups
5. PDB (Pluggable Database) is closed
In multi-tenant (CDB/PDB) systems, connecting to a closed PDB will trigger ORA-12514.
6. Wrong port or wrong listener
Multiple listeners → wrong one being used.
How to Diagnose the Issue Step-by-Step
Let’s walk through the exact checks every DBA should perform.
Step 1: Check listener for available services
Run:
lsnrctl status
Look for entries like:
Service "orcl.example.com" has 1 instance(s).
If your expected service name is NOT listed → that’s your cause.
Step 2: Check actual service names inside Oracle
Login:
sqlplus / as sysdba
Then:
SELECT name FROM v$services;
This shows the real, correct service names.
If the service you are using does not appear here, it won’t appear in the listener either.
Step 3: Check database state
Run:
SELECT status FROM v$instance;
If the instance is NOT OPEN, fix that first.
Step 4: Trigger dynamic registration
Run:
ALTER SYSTEM REGISTER;
Then recheck:
lsnrctl status
Step 5: Validate tnsnames.ora
Make sure your entry looks like:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = mydbserver)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl.example.com)
)
)
Avoid:
❌ SID instead of SERVICE_NAME
❌ Wrong hostname
❌ Wrong domain
How to Fix ORA-12514: Complete Solutions
Below are fixes used in real-world environments.
✅ Fix 1: Correct the SERVICE_NAME
Most problems are simply caused by using the wrong name.
Check services:
SELECT name FROM v$services;
Then update your tnsnames.ora with the correct value.
✅ Fix 2: Force instance registration
If the database is slow to register with the listener:
ALTER SYSTEM REGISTER;
This instantly updates the listener.
✅ Fix 3: Set LOCAL_LISTENER
When using a non-default IP/port, you must set:
ALTER SYSTEM SET local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.100)(PORT=1521))';
ALTER SYSTEM REGISTER;
✅ Fix 4: Add static registration (listener.ora)
If dynamic registration is not enough, add:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl.example.com)
(ORACLE_HOME = /u01/app/oracle/product/19c/dbhome_1)
(SID_NAME = ORCL)
)
)
Restart listener:
lsnrctl stop
lsnrctl start
✅ Fix 5: Open the PDB (for 12c → 23c)
If your PDB is closed:
SHOW PDBS;
If status shows MOUNTED:
ALTER PLUGGABLE DATABASE pdb1 OPEN;
ALTER SYSTEM REGISTER;
✅ Fix 6: Ensure correct listener is being used
If your system has multiple listeners:
lsnrctl status LISTENER1
lsnrctl status LISTENER2
Your TNS entry must match the correct port and listener.
Real Example from Production
A client faced ORA-12514 after a server reboot.lsnrctl status showed:
Service "salesdb" has no instances.
But inside the database:
SELECT name FROM v$services;
Showed:
salesdb.example.com
Fix: Update tnsnames.ora to use the fully qualified service name.
Result: Application connected immediately.
How to Prevent ORA-12514 in the Future
Here’s what smart DBAs do:
✔ Use SERVICE_NAME, not SID, in all new configs
✔ Always check service names using V$SERVICES
✔ Verify listener state after every reboot
✔ Open PDBs automatically (if needed)
ALTER PLUGGABLE DATABASE ALL OPEN;
✔ Keep TNS entries clean and simple
✔ Document service names and listener configs
Final Thoughts
The ORA-12514 error looks technical at first glance, but the underlying issue is usually simple:
your listener does not know the service name you’re requesting.
By following the checks and solutions in this guide—especially matching SERVICE_NAME values, ensuring proper listener registration, and keeping the database fully open—you can eliminate this error quickly in any environment.



