Home > Database > Oracle > body text

What is the 12154 error in oracle

WBOY
Release: 2022-06-20 16:28:15
Original
29536 people have browsed it

The 12154 error in oracle means that the specified connection cannot be resolved. Solution: 1. Because the environment variables are not matched, you can solve the problem by modifying the "TNS_ADMIN" and "NLS_LANG" parameters; 2. If the environment variables are correct, change the "listener.ora", Just configure the "tnsnames.ora" or "sqlnet.ora" file.

What is the 12154 error in oracle

The operating environment of this tutorial: Windows 10 system, Oracle version 12c, Dell G3 computer.

What is the 12154 error in oracle?

When reinstalling Oracle12c, I found an error when connecting to the database

You can use the super user to connect to oracle

What is the 12154 error in oracle

But I cannot use the sys account to connect as a super user.

Execute connect sys/oraclexe@orcl as sysdba and report an error: ORA-12154: TNS:could not resolve the connect identifier specified, that is, the specified cannot be resolved. Connection

Oracle reports ORA-12154 which may be caused by a variety of reasons

Troubleshooting method:

1. Check whether the environment variables are correct, most errors It's because the environment variables are not paired.

TNS_ADMIN= %Oracle_Home%\network\admin --Set to the actual installation directory

NLS_LANG= AMERICAN_AMERICA.UTF8

Oracle_Home is the actual directory where Oracle is installed. Generally It is xxx/product\12.2.0\dbhome_1

2. If the environment variables are correct, there may be a problem with the listener.ora, tnsnames.ora or sqlnet.ora files

These three files are in the Oracle_Home/network\admin folder

After investigation, it was found that the tnsnames.ora file was missing locally. After supplementing the configuration, the related configuration problems were solved

Configuration As follows:

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
Copy after login

Recommended tutorial: "Oracle Video Tutorial"

The above is the detailed content of What is the 12154 error in oracle. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template