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 1instance(s).
# Service"orclpdb1" has 1instance(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.