We have an application running locally where we're experiencing the following error:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I've tested the connection using TNSPing
which resolved correctly and
I tried SQLPlus
to try connecting, which failed with the same error as above. I used this syntax for SQLPlus
:
sqlplus username/password@addressname[or host name]
We have verified that:
- the TNS Listener on the server is running.
- Oracle itself on the server is running.
We don't know of any changes that were made to this environment. Anything else we can test?
I know this is an old question, but still unanswered. It took me a day of research, but I found the simplest solution, at least in my case (Oracle 11.2 on Windows 2008 R2) and wanted to share.
The error, if looked at directly, indicates that the listener does not recognize the service name. But where does it keep service names? In
%ORACLE_HOME%\NETWORK\ADMIN\listener.ora
The "SID_LIST" is just that, a list of SIDs and service names paired up in a format you can copy or lookup.
I added the problem Service Name, then in Windows "Services" control panel, I did a "Restart" on the Oracle listener service. Now all is well.
For example, your listener.ora file might initially look like:
... And to make it recognize a service name of
orcl
, you might change it to:I got the same error because the remote SID specified was wrong:
I queried the system database:
select * from global_name;
and found my remote SID ("XE").
Then I could connect without any problem.
Starting the OracleServiceXXX from the services.msc worked for me in Windows.
For those that may be running Oracle in a VM (like me) I saw this issue because my VM was running out of memory, which seems to have prevented OracleDB from starting up/running correctly. Increasing my VM memory and restarting fixed the issue.
Check to see the database is up. Log onto the server, set the ORACLE_SID environment variable to your database SID, and run SQL*Plus as a local connection.
This error can occur when an application makes a new connection for every database interaction or the connections are not closed properly. One of the free tools to monitor and confirm this is Oracle Sql developer (although this is not the only tool you can use to monitor DB sessions).
you can download the tool from oracle site Sql Developer
here is a screenshot of how to monitor you sessions. (if you see many sessions piling up for your application user during when you see the ORA-12514 error then it's a good indication that you may have connection pool problem).