The Oracle error ORA-12514: TNS:listener does not currently know of service requested in connect descriptor is a common issue.
This happens when an application or tool attempts to establish a connection to an Oracle database. Even if a TNSPING command to the server is successful, connection attempts via SQL*Plus or other clients may fail with this error.
This indicates that while the listener is reachable, it cannot recognize or process the specific service name provided in the connection request.
This article delves into the typical causes of the ORA-12514 error and outlines several practical solutions to restore database connectivity.
Understanding the ORA-12514 Error: The “Why”
At its core, the ORA-12514 error signifies a breakdown in communication where the Oracle Listener component, responsible for managing incoming connection requests, cannot find a match for the service name specified by the client. This discrepancy can arise from several factors:

- Client-Side Mismatch: The
SERVICE_NAMEin the client’s connection string ortnsnames.orafile does not correspond to any service registered with the listener on the database server. - Service Not Registered with Listener: The database instance may not have successfully registered its service(s) with the listener. This can occur if the database instance is down, not fully started, or if dynamic service registration (via PMON) is encountering issues.
- Listener Configuration (
listener.ora): If static registration is used, thelistener.orafile on the server might lack the correct entry for the requested SID or service name. - Incorrect Client Configuration: Applications, especially those using JDBC, might employ an incorrect connection string format, confusing SIDs with service names. Similarly, database management tools may require specific SID or service name connections settings.
- Database or System-Level Problems: Underlying issues such as the Oracle database service not running, insufficient system resources (like memory or disk space on the server), or network configuration problems (like incorrect host resolution) can prevent the service from being available or known to the listener.
- Targeting the Wrong Listener: The client’s configuration might be pointing to an incorrect host or port, attempting to connect to a listener unaware of the intended service.
Read: How to Fix ORA-28040: No Matching Authentication Protocol in Oracle
Solutions to Resolve ORA-12514
Addressing the ORA-12514 error involves identifying the point of failure in the client-listener-database communication chain. Below are several approaches that tackle common causes.

1. Validating and Correcting tnsnames.ora (Client-Side)
The tnsnames.ora file on the client machine maps a human-readable alias to detailed connection parameters. An incorrect SERVICE_NAME here is a frequent culprit.
Steps:
- Identify Valid Service Names: If direct database access is possible (e.g., on the server or via an existing working connection), query the database to find its registered service names:
SELECT value FROM v$parameter WHERE name='service_names'; - Locate and Edit
tnsnames.ora: This file is typically found in the#ORACLE_HOME#\NETWORK\ADMIN\directory on Windows, or$ORACLE_HOME/network/admin/on Unix/Linux systems. - Update the Entry: Ensure the
SERVICE_NAMEin your connection alias matches one of the valid service names obtained from the database. Sometimes, this involves removing a domain suffix if the database registers only the base name.Exampletnsnames.oraentry:MY_TARGET_DB_ALIAS = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = #your_db_hostname#)(PORT = #your_db_port#)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = #actual_service_name_from_db#) ) )Replace
#your_db_hostname#,#your_db_port#, and#actual_service_name_from_db#with appropriate values. - Test Connection: Attempt to connect using the updated alias:
sqlplus your_username/your_password@MY_TARGET_DB_ALIAS
After modifying tnsnames.ora on the client, a listener restart is generally not required unless the client itself is running a listener or caching TNS entries heavily. The key is that the client now sends the correct service name request to the server’s listener.
Read: How to Fix ORA-01017: Invalid Username/Password Logon Denied in Oracle Database
2. Configuring listener.ora (Server-Side)
If the listener is not dynamically learning about the service, or if static registration is preferred, the listener.ora file on the database server must explicitly list the service.
Steps:
- Locate
listener.ora: This file is typically in#ORACLE_HOME#\NETWORK\ADMIN\on the database server. - Add Service Information: Add or modify a
SID_DESCentry within theSID_LIST_LISTENERsection.Example modification tolistener.ora:SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) # Default entry, keep if present (ORACLE_HOME = #your_oracle_home_path#) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:#your_oracle_home_path#\bin\oraclr.dll") # Adjust DLL for version ) (SID_DESC = (GLOBAL_DBNAME = #your_global_db_name#) # e.g., orcl.example.com (ORACLE_HOME = #your_oracle_home_path#) (SID_NAME = #your_sid_name#) # e.g., orcl ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = #your_server_hostname_or_ip#)(PORT = #your_listener_port#)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC#your_listener_port#)) # Port number often part of IPC key ) )Ensure
#your_global_db_name#,#your_oracle_home_path#,#your_sid_name#,#your_server_hostname_or_ip#, and#your_listener_port#are set correctly. TheGLOBAL_DBNAMEoften corresponds to the service name clients use. - Restart the Listener: Apply changes by restarting the listener service. On Windows, this can be done through the “Services” control panel (
services.msc). From the command line:lsnrctl stop lsnrctl startIf you have a specific listener name (other than the default `LISTENER`), use `lsnrctl stop YOUR_LISTENER_NAME` and `lsnrctl start YOUR_LISTENER_NAME`.
3. Utilizing Oracle Net Manager (GUI Approach)
Oracle Net Manager provides a graphical interface for configuring network services, including the listener.
Steps:
- Launch Oracle Net Manager (e.g., from Start Menu > Oracle > Configuration and Migration Tools).
- Navigate to “Local” > “Listeners” and select your listener (e.g., `LISTENER`).
- From the dropdown menu, choose “Database Services”.
- Add a new database service or edit an existing one. Ensure:
- “Global Database Name” is set to the service name clients will use.
- “Oracle Home Directory” points to the correct Oracle installation path.
- “SID” (System Identifier) is correctly specified for the database instance.
In many configurations, the “Global Database Name” and “SID” might be the same, or the Global Database Name might be `SID.yourdomain.com`.
- Save the network configuration (File > Save Network Configuration).
- Restart the listener service for changes to take effect.
4. Ensuring Correct JDBC Connection String Syntax
For applications using JDBC, the connection string format is crucial. There are distinct formats for connecting via Service Name versus SID.
| Connection Type | JDBC URL Format |
|---|---|
| Service Name | jdbc:oracle:thin:@//:/ |
| SID | jdbc:oracle:thin:@:: |
Replace , , , or with your specific values.
For Spring Boot applications, this is configured in application.properties or application.yml:
Using Service Name:
spring.datasource.url=jdbc:oracle:thin:@//#your_db_host#:#your_db_port#/#your_service_name#
Using SID:
spring.datasource.url=jdbc:oracle:thin:@#your_db_host#:#your_db_port#:#your_sid#
Carefully verify which identifier (service name or SID) is appropriate for your database setup and ensure the URL syntax matches.
5. Managing Oracle Services (Windows)
The Oracle database instance itself must be running for its services to be available.
Steps:
- Open the Windows Services console (
services.msc). - Locate the Oracle service associated with your database instance (e.g.,
OracleServiceORCL,OracleServiceXE, or a custom name). - If the service is not running, start it. Ensure its “Startup Type” is set to “Automatic” if it should start with the system.
6. Adjusting Database Connection Tool Settings
Some database management tools (like DBeaver) provide options to specify whether you are connecting using a “Service Name” or “SID”. Selecting the incorrect option can lead to ORA-12514.
Review your tool’s connection settings and ensure you’ve chosen the correct identifier type that matches your tnsnames.ora or direct connection parameters.
7. Verifying Database Instance Status and Registration
Even if the listener is up, the database instance might be down or not properly registered with the listener.
Steps:
- Connect Locally as SYSDBA: On the database server, set your environment (if necessary) and connect as a privileged user:
# For Linux/Unix export ORACLE_SID=#your_sid# sqlplus / as sysdba # For Windows set ORACLE_SID=#your_sid# sqlplus / as sysdba - Check Instance Status: If connected successfully, the instance is at least partially up. If you get an “idle instance” message, the database is down.
- Startup Database (if down):
STARTUP; - Force Service Registration: If the database is running but services might not be registered, you can prompt the instance to register with the listener:
ALTER SYSTEM REGISTER;This is less disruptive than restarting the entire database.
8. Addressing System-Level and Environmental Factors
Various system-level issues can indirectly cause ORA-12514:
- Insufficient VM Memory: If Oracle is running in a virtual machine, ensure the VM has adequate memory allocated. Insufficient memory can prevent Oracle services from starting correctly.
- Linux
/etc/hostsConfiguration: An incorrect IP address mapping for the hostname in the/etc/hostsfile on a Linux server can cause listener or connection issues. Verify withifconfig(orip addr) and update/etc/hostsif necessary. - Static vs. Dynamic IP: If the Oracle server was installed using a dynamic IP address that has since changed, the listener configuration might be stale. Using a static IP for database servers is recommended.
- Server Disk Space: A full disk on the database server can prevent the database from operating correctly, leading to services becoming unavailable.
- Firewall Rules: Ensure that firewalls (on the server, client, or network) are not blocking TCP traffic on the Oracle listener port (typically 1521) for the
TNSLSNR.exe(Windows) or `tnslsnr` (Linux) process. While TNSPing might use a simpler handshake, full client connections can be blocked.
9. Correcting Simple Configuration File Syntax
Typos in configuration files like tnsnames.ora or listener.ora are easy to make and can lead to this error. Double-check for:
- Mismatched parentheses.
- Incorrect indentation (though Oracle parsers are somewhat tolerant, good practice helps readability).
- Spelling errors in keywords, hostnames, or service names.
- Example: A missing closing parenthesis for a
SERVICE_NAMEentry intnsnames.ora.
10. Using Simplified Connection Strings
In some environments, particularly for local connections or when EZCONNECT is enabled in sqlnet.ora (e.g., NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)), a simplified connection string might work:
sqlplus your_username/your_password@#your_db_hostname#
Or, for a local default instance:
sqlplus your_username/your_password@localhost
This attempts to connect to a default service, which might bypass issues with explicitly named services if the default is correctly registered.
Verification and Testing
After applying a potential solution, verify its effectiveness by:
- Attempting the connection again using SQL*Plus:
sqlplus username/password@connect_identifier. - Running the application that previously encountered the ORA-12514 error.
- On the database server, checking the listener status for the registered service:
lsnrctl status #your_listener_name#(omit listener name for default).
Monitoring listener log files (listener.log) and database alert logs (alert_.log) can also provide valuable diagnostic information.
Conclusion
The ORA-12514 error indicates that the Oracle listener, while reachable, cannot identify the service requested by the client. This can stem from misconfigurations on the client side (tnsnames.ora, JDBC URL), server-side (listener.ora, database registration), or broader system issues.
By systematically checking the client’s request, the listener’s configuration, the database’s status and registration, and underlying environmental factors, developers and administrators can effectively diagnose and resolve this common connectivity problem, ensuring reliable access to Oracle database services.
