Home › Database › ORA-12514 and ORA-12541: TNS Listener Errors Explained (Service Name vs No Listener)
Beginner 3 min · November 15, 2026

ORA-12514 and ORA-12541: TNS Listener Errors Explained (Service Name vs No Listener)

ORA-12541 means no listener at that host and port.

N
Naren Founder & Principal Engineer

20+ years shipping high-throughput database systems. Written from production experience, not tutorials.

Follow
✓ Production
production tested
November 15, 2026
last updated
2,132
articles · all by Naren
Before you start⏱ 6 min
  • ✓Basic SQL
  • ✓Oracle client connection basics
 ● Production Incident 🔎 Debug Guide
⚡Quick Answer
  • ORA-12541: no listener at host:port. Start it (lsnrctl start) or fix host/port.
  • ORA-12514: listener is up, service name unknown.
  • Run lsnrctl status (or lsnrctl services) on the DB host to see registered services.
  • Use a listed service name: for a PDB it's usually the PDB's service, not the CDB SID.
  • SID and SERVICE_NAME are different; //host:port/NAME uses a service name.
  • Just restarted the DB? Registration can take a moment; ALTER SYSTEM REGISTER forces it.
✦ Definition~90s read
What is ORA-12514 and ORA-12541?

An Oracle client connects in two steps: reach the listener at host:port, then ask it for a service by name. ORA-12541 (TNS:no listener) fails at step one: nothing is listening at that address. ORA-12514 (TNS:listener does not currently know of service requested in connect descriptor) fails at step two: the listener is up, but no database instance has registered that service name.

★
ORA-12541: the reception desk is empty.
Plain-English First

ORA-12541: the reception desk is empty. ORA-12514: the receptionist is there, but has never heard of the person you asked for.

After a weekend migration to a pluggable database, tnsping worked but the app failed with ORA-12514. It was still asking for the old service name.

Two Steps, Two Errors

First the client reaches the listener. Then it asks for a service. ORA-12541 fails at the first step; ORA-12514 at the second.

steps.txtTEXT
1
2
client -> db9:1521        (no one there?     ORA-12541)
client -> listener: ORCL  (unknown service?  ORA-12514)
🎯 Key Takeaway
12541 = no listener; 12514 = unknown service.

Ask the Listener

lsnrctl status lists the services that instances have registered. Use one of those names exactly.

lsnrctl.shBASH
1
2
3
lsnrctl status | grep Service
# Service "ORCLCDB" has 1 instance(s).
# Service "orclpdb1" has 1 instance(s).
🎯 Key Takeaway
The listener's list is the truth.

Fix the Connect String

Easy Connect uses a service name after the slash. For a pluggable database, that's the PDB's service.

url.txtTEXT
1
2
3
4
jdbc:oracle:thin:@//db9:1521/orclpdb1
# tnsnames.ora
APP = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db9)(PORT=1521))
       (CONNECT_DATA=(SERVICE_NAME=orclpdb1)))
🎯 Key Takeaway
//host:port/service_name.

Start or Register

For ORA-12541 start the listener. For a service that should exist but isn't listed, make the instance register.

register.sqlSQL
1
2
-- on the server, as the oracle user: lsnrctl start
ALTER SYSTEM REGISTER;
🎯 Key Takeaway
lsnrctl start; ALTER SYSTEM REGISTER.
● Production incidentPOST-MORTEMseverity: high

tnsping Worked, the App Didn't

Symptom
ORA-12514 on every connection Monday morning; tnsping db9 returned OK.
Assumption
The team assumed the listener was broken, because the error mentions it.
Root cause
The new database registered services ORCLCDB and orclpdb1. The app requested ORCL, which no instance registered.
Fix
Changed the URL to jdbc:oracle:thin:@//db9:1521/orclpdb1.
Key lesson
  • tnsping only proves the listener answers.
  • Ask the listener which services it knows.
  • PDB service names differ from the old SID.
Production debug guideWhich step failed?3 entries
Symptom · 01
ORA-12541
→
Fix
lsnrctl status on the host; check the port in listener.ora and the client's host/port.
Symptom · 02
ORA-12514
→
Fix
lsnrctl status | grep Service and compare with the client's SERVICE_NAME.
Symptom · 03
ORA-12514 right after startup
→
Fix
Wait for registration or run ALTER SYSTEM REGISTER.
⚙ Quick Reference
4 commands from this guide
FileCommand / CodePurpose
steps.txtclient -> db9:1521 (no one there? ORA-12541)Two Steps, Two Errors
lsnrctl.shlsnrctl status | grep ServiceAsk the Listener
url.txtjdbc:oracle:thin:@//db9:1521/orclpdb1Fix the Connect String
register.sqlALTER SYSTEM REGISTER;Start or Register

Key takeaways

1
12541 = nothing listening.
2
12514 = listener up, service unknown.
3
lsnrctl status shows the real names.
4
SID != SERVICE_NAME.
5
ALTER SYSTEM REGISTER after restarts.

Common mistakes to avoid

3 patterns
×

Using the SID as SERVICE_NAME

Symptom
ORA-12514.
Fix
Use a registered service name.
×

Trusting tnsping

Symptom
tnsping OK, connect fails.
Fix
tnsping only reaches the listener.
×

Wrong port

Symptom
ORA-12541.
Fix
Check listener.ora and the client.
INTERVIEW PREP · PRACTICE MODE

Interview Questions on This Topic

Q01SENIOR
Difference between ORA-12514 and ORA-12541?
Q01 of 01SENIOR

Difference between ORA-12514 and ORA-12541?

ANSWER
12541: no listener at that address. 12514: the listener is up but doesn't know the requested service.
FAQ · 3 QUESTIONS

Frequently Asked Questions

01
How do I fix ORA-12514?
02
How do I fix ORA-12541?
03
Why does tnsping work but ORA-12514 still happens?
N
Naren Founder & Principal Engineer

20+ years shipping high-throughput database systems. Written from production experience, not tutorials.

Follow
✓ Verified
production tested
November 15, 2026
last updated
2,132
articles · all by Naren
🔥

That's PL/SQL. Mark it forged?

3 min read · try the examples if you haven't

←
Previous
ORA-12154: TNS: Could Not Resolve the Connect Identifier
18 / 33 · PL/SQL
Next
Oracle Error ORA-01858: A Non-Numeric Character Was Found
→