ORA-12154: TNS: Failed to resolve the specified connection identifier (PLSQL Developer)

I need to use PLSQL Developer to access Oracle databases. When trying to connect to my database, the following error appears. ORA-12154: TNS:could not resolve the connect identifier specified. I can use SQLPLUS from the command line to connect to the database, and tnsping returns successfully, but I can not understand why PLSQL Developer will not work - it uses the correct tnsnames.ora , and the connection string there is correct, because it is used by the same that is used by tnsping .

Does anyone have an idea what I can do to fix this? I looked at other topics about this particular error with no luck.

tnsnames.ora

  ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = MININT-AIVKVBM)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) 

sqlnet.ora

  SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) 

Sqlpus command line image here

Preferences for connecting to PLSQL : here

+4
source share
12 answers

The answer was to simply move the PLSQL developer folder from "Program Files (x86) to the" Program Files "folder - weird!

+25
source

This error is very common, often the very first one you are trying to connect to your database with. I suggest these 6 steps to fix ORA-12154:

  • Verify the instance name is entered correctly in tnsnames.ora.
  • There must be no control characters at the end of the instance or database name.
  • All paranesia around the TNS record must be properly completed.
  • The domain name entry in sqlnet.ora must not conflict with the full database name.
  • If the problem still persists, try re-creating the TNS entry in tnsnames.ora.
  • Finally, you can add new records using the SQL * Net Easy configuration utility.

For more information: http://turfybot.free.fr/oracle/11g/errors/ORA-12154.html

+3
source

As I can not add a comment, I just thought that I would send this to complete. Tufy's answer is correct, this applies to brackets (brackets) in the path to the running application.

There is an existing network error in which the network layer cannot analyze the locations of programs that contain brackets in the path to the executable that is trying to connect to Oracle.

Filed in Oracle, indicates error 3807408.

A source

+1
source

copy pl sql developer paste to x86 program files and program files. if the client is installed in another partition / disk, then copy pl sql-developer to this disk. and run from the pl sql developers folder instead of the desktop shortcut.

final decision! Cold

+1
source
  • This did not work, so I switched to oracle sql developer and worked without problems (connection up to 1 minute).
  • This link gave me the idea to connect to MS Access , so I created a user in oracle sql developer and tried to connect to it in Toad and it worked.

Or the second solution

you can try to connect using Direct not TNS by providing the host and port on the Toad connection screen

0
source

For me it was a bad formatting for the tnsnames.ora connection identifier. Indentation of the identifier string is required, as shown in the tnsnames.ora example in the comment.

0
source

I just wanted to add - apparently, this can also be caused by installing Instant Client on 10, after which you understand that you want to completely install and install it again in the parallel directory. I don’t know why it broke him.

0
source

In addition to the above solutions, also check the location where the tnsname ora file exists and compare it with the path in the environment variable

0
source

I had a problem at work. The oracle server was β€œfixed”, and one of the databases that I use could not be connected via the TNSNames record, but through a basic connection. The database was installed, and the administrator could see that it was running.

In addition, any application using TNS to connect to the database also does not work.

The problem was that the database name was incorrect in the TNS file, but for some reason it worked for years. Correction of the name fixed it for us. I found that Oracle SQL Developer continued to use the old TNS record even after I updated it, and I do not want to reinstall it for only one database connection. It seems that when the database was created, it was given a smaller name, and then the others and after some action cut and paste into the TNSNames file, it was confused. No one is sure how this worked as we study it, but the oracle patch guaranteed that the name must be correct.

An example of a name was the name "DBName.Part1.Part2", but actually the database name was "DBName"

0
source

JUST copy and paste tnsnames and sqlnet files from Oracle home into PLSQL developer main folder. Use the below request to get the oracle home

select substr (file_spec, 1, instr (file_spec, '\', -1, 2) -1) ORACLE_HOME from dba_libraries where library_name = 'DBMS_SUMADV_LIB';

0
source

I had the same VM problem that CentOS7 and Oracle 11GR2 were running on, accessible from Windows 7, the solution was strange, on my local machine tnsnames pointing to the DB took place in front of the service name, I just deleted the space and then I was able to to connect.

A quick example.

Invalid tnsnames.

[this is empty space] XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))

EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC_FOR_XE))) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = PO)))

Right tnsnames.

XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))

EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC_FOR_XE))) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = PO)))

0
source

ORA-12154: TNS: Failed to resolve the specified connection identifier (PLSQL developer)

Answer. Navigate to the folder in which you installed the ORACLE database. for example E:\oracle\product\10.2.0 [or as your oracle version]\db-1\network\ADMIN , and then copy the two files (1) sqlnet.ora, (2) tnsnames.ora and close this folder. Go to the folder where you installed ORACLE DEVELOPER. for example E:\DevSuitHome_1\NETWORK\ADMIN , then rename the two files (1) sqlnet.ora, (2) tnsnames.ora and paste the two copied files here, and yours are fine.

-1
source

Source: https://habr.com/ru/post/1438986/


All Articles