ORA-12514: TNS: listener doesn't know the requested service
The listener answered, but no database has registered the service name you asked for. Usually a wrong service name, a closed PDB or a database that is down.
- Error code
ORA-12514- Category
- Connection and login
What it means
The client reached the listener, so host and port are right, but the listener has no service by the name in your connect descriptor. Databases register their services with the listener dynamically; until a database (or PDB) is open and registered, the listener can't hand connections to it.
Newer releases word it as Cannot connect to database. Service service_name is not registered with the listener at host_port.
Common causes
- A typo in the service name, or using the SID or database name where the service name is required.
- The database or PDB is down or not open, so its service isn't registered.
- The database registers with a different listener (
LOCAL_LISTENERpoints elsewhere) or registration hasn't happened yet after a listener restart. - Connecting to the CDB's name when the service you need belongs to a PDB.
How to fix it
-
On the server, list the services the listener knows:
lsnrctl status(orlsnrctl services). -
In the database, check the service names and open the PDB if it is mounted.
SELECT name FROM v$services; SELECT name, open_mode FROM v$pdbs; ALTER PLUGGABLE DATABASE salespdb OPEN;
-
Ask the database to register with the listener now.
ALTER SYSTEM REGISTER;
-
Fix the client's connect string to use a service name the listener lists.
Related errors
ORA-12505TNS: listener doesn't know the SIDORA-12541TNS: no listenerORA-12154TNS: could not resolve the connect identifierORA-01034ORACLE not available
More connection and login errors
ORA-01017invalid username/password; logon deniedORA-12170TNS: connect timeout occurredORA-03113end-of-file on communication channelORA-03135connection lost contactORA-28000the account is lockedORA-28001the password has expiredORA-27101shared memory realm does not existORA-12519TNS: no appropriate service handler found
The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.
Work on Oracle in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Oracle and the other databases you use.