• Register
0 votes
98 views

Problem :

We have the application running locally where we are experiencing the below error:

“ORA-12514: TNS:listener does not currently know of service requested in connect descriptor”

I have already tested the connection using the TNSPing which resolved it correctly and when I tried the SQLPlus connecting, which failed unfortunately with the above error. I have used below syntax for my SQLPlus :

sqlplus username/password@addressname[or host name]

We have already verified that:

· My TNS Listener on my server is running.

· Also Oracle itself on my server is running.

We are unable to know of any changes that were made to my environment. Anything else that we can test?

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I had the same issue and the simple fix was to make sure that in the tnsnames.ora your SERVICE_NAME should be valid service name in the database. To find out the valid service names, you should use the below query in oracle:

select value from v$parameter where name='service_names'

And I updated the tnsnames.ora as below :

MYTEST =

   (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = *<validhost>*)(PORT = *<validport>*))

    )

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = *<servicenamefromDB>*)

    )

)

then I ran the below command:

sqlplus user@MYTEST

Success! your listener is basically telling you that whichever service_name you are trying to use is not the valid service according to your DB.

9 7 4
38,600 points

Related questions

0 votes
1 answer 180 views
180 views
Problem : I have an application which is running locally where I am facing the following error: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor Already I have tested the connection using TNSPing which resolved correctly also I ... server is running properly. · Oracle itself on the server is running properly. Does anybody have any solution on my problem?
asked Nov 24, 2019 alecxe 7.5k points
0 votes
1 answer 4 views
4 views
Problem: tns listener was not given the service_name in connect_data
asked Feb 17 Dan phillip 1.9k points
0 votes
1 answer 20 views
0 votes
1 answer 40 views
40 views
Problem : I am very new to JDBC. Now I am trying to connect to the Oracle 11g database using my ojdbc14 jar on the eclipse kepler IDE with the java 8 on my windows 7 PC. But when I try to run the below code I often face the following error. import ... DB"); } } } And the encountered Error is as below : java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
asked Feb 14, 2020 mphil 2.3k points
1 vote
1 answer 215 views
215 views
Problem : I am learning Oracle and trying to create and drop tables. If I try to drop my table it is always showing me below error: DROP TABLE SUBURB; DROP TABLE CITY; DROP TABLE STATE; Error at line 1: ORA-02449: unique/primary keys in table referenced ... already used by an existing object. I am unable to understand the above errors. Can someone guide me in fixing above Oracle related errors?
asked May 12, 2020 Martin K 6.6k points
0 votes
1 answer 77 views
77 views
Problem : I am newly installing the Oracle XE database on my Ubuntu by following below steps: Downloaded the latest rpm file for the Oracle XE and ran below commands to install my database: sudo apt-get install alien alien oracle-xe-11.2.0-1.0.x86_64.rpm ... to start my database then I am facing below error &ldquo;Ora-00205: error in identifying control file, check alert log for more info&rdquo;
asked Jan 29, 2020 jwilliam 3.9k points
0 votes
1 answer 3 views
3 views
Problem: ora 02049 timeout distributed transaction waiting for lock
asked 6 days ago Dan phillip 1.9k points
0 votes
1 answer 7 views
7 views
Problem: ora-28009: connection as sys should be as sysdba or sysoper
asked Feb 18 Ethan ross 1.8k points
0 votes
1 answer 3 views
3 views
Problem: Java program to demonstrate this error. This program reproduce this error by first leaving out the required JDBC JAR from classpath and also not explicitly registering the driver before use by not calling Class.forName() method.
asked Feb 18 Ali 4.4k points
0 votes
1 answer 5 views
5 views
Problem: java.sql.sqlexception: ora-28040: no matching authentication protocol.
asked Feb 15 Ethan ross 1.8k points