Home Database SQL What should I do if ora-12154: The specified connection identifier cannot be resolved?

What should I do if ora-12154: The specified connection identifier cannot be resolved?

Nov 16, 2019 am 09:38 AM
identifier

What should I do if ora-12154: The specified connection identifier cannot be resolved?

Use PL/SQL Developer to connect to the company's Oracle database. The following error message appears when logging in: ORA-12154: TNS: Unable to parse the specified connection identifier , ( Sometimes the error dialog box may not appear, but the connection cannot be made. If you try several times, the error dialog box as shown below will pop up). (Recommended learning: mysql learning)

What should I do if ora-12154: The specified connection identifier cannot be resolved?

1. Check the service

If this problem occurs, first What we think of is checking whether there is a problem with the service OracleOraDb11g_home2TNSListener. Enter services.msc during operation, open the service window, and check whether the OracleOraDb11g_homeTNSListener service is running. If not, start it.

2. Use SQL PLUS to test the connection.

If there are still problems, we use SQL PLUS to test whether we can connect. Run cmd and enter

sqlplus sys/password@database SID as sysdba

in the command prompt window. For example:

sqlplus sys/abc123@orcl as sysdba
Copy after login

If you can connect , the problem is easier to solve, indicating that there is no problem with our database instance. The problem should lie in the configuration of the Oracle client and pl/sql developer.

3. Check the tnsnames.ora configuration

In the client installation path, mine is D:\oracle\instantclient_12_1\NETWORK\ADMIN, create a file, The name is: tnsnames.ora. If it has been created before, just open it and add it directly. Add the following content to tnsnames.ora:

SID名 =
  (DESCRIPTION =    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))    (CONNECT_DATA =      (SERVER = DEDICATED)      (SERVICE_NAME = SID名)  )
Copy after login

Note that there cannot be any other characters in front of the SID name, especially spaces!

After saving, see if you can log in. If it still doesn't work, click the "Cancel" button in the login window of pl/sql developer. After entering pl/sql developer, execute "Tools"-> "Preferences"-> Connection, and configure as shown in the figure below ( The oracle home directory is the path of the oracle client).

What should I do if ora-12154: The specified connection identifier cannot be resolved?

The above is the detailed content of What should I do if ora-12154: The specified connection identifier cannot be resolved?. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

C++ error: identifier not found, what should I do? C++ error: identifier not found, what should I do? Aug 22, 2023 am 10:45 AM

When developing programs using the C++ programming language, we often encounter “identifier not found” errors. This error message usually means that the compiler cannot find the definition of a variable, function, or class. This article will explain the cause of this error and how to fix it. Reasons why the identifier cannot be found First, let us take a look at why the "identifier not found" error occurs. This error report usually has the following reasons: 1.1 The variable, function or class is not defined. This is one of the most common reasons for "identifier not found". if a

What are the requirements for legal identifiers in C language? What are the requirements for legal identifiers in C language? Aug 27, 2020 pm 01:47 PM

The requirements for legal identifiers in C language are: 1. The identifier can only consist of letters (A~Z, a~z), numbers (0~9) and underscores (_); 2. The first character must be a letter or Underscores cannot be numbers; 3. The uppercase and lowercase letters in the identifier are different and represent different meanings; 4. The identifier cannot be a keyword.

Understanding Go identifiers: from syntax to semantics Understanding Go identifiers: from syntax to semantics Apr 07, 2024 pm 09:36 PM

In the Go language, identifiers are used to name entities. Grammar rules include starting with a letter or underscore, can contain letters, numbers, or underscores, and cannot be reserved keywords. Semantically, constant identifiers starting with an uppercase letter represent immutable values, variable identifiers starting with a lowercase letter represent mutable values, type identifiers starting with an uppercase letter represent a set of values, and function identifiers starting with a lowercase letter are usually preceded by Func prefix. Understanding these rules and semantics is critical to creating clear, maintainable code.

What is the meaning of identifiers in javascript What is the meaning of identifiers in javascript Jun 15, 2021 pm 05:41 PM

In JavaScript, identifiers refer to names used by users when programming. They are used to name variables, constants, functions, statement blocks, etc., to establish a relationship between names and uses; identifiers usually consist of letters, numbers, and other characters. constitute. The first character of a legal identifier must be a letter, underscore, or dollar sign; it cannot have the same name as a JavaScript keyword or reserved word.

In C language, what is an identifier? In C language, what is an identifier? Sep 02, 2023 pm 10:09 PM

Identifiers are used for any variable, function, data definition, label, etc. in a program. Before starting any language, you must at least know how to name identifiers. In C language, an identifier is a combination of alphanumeric characters, i.e. it starts with a letter or an underscore, and the remainder is a letter, any number or an underscore. Identifier Naming Rules The rules that must be followed when naming identifiers are as follows - The case of alphabetic characters is important. For example, using "TUTORIAL" for a variable is different from using "tutorial" for a variable, and it is different from using "TutoRial" for a variable. These three variables all refer to different variables. There is no requirement for the length of identifiers. We may have problems with some compilers if the identifier exceeds 31 characters. for

What types of identifiers are there in C language? What types of identifiers are there in C language? Nov 28, 2022 pm 07:03 PM

There are three types of C language identifiers: 1. Keywords, which are strings with specific meanings specified by the C language, often also called reserved words; 2. Predefined identifiers, which are identifiers predefined by the system, such as function libraries The function names, macro definitions and type aliases in; 3. User-defined identifiers are identifiers defined by users according to their own needs. They are generally used to name variables, functions, arrays, etc. If the user identifier is the same as a keyword, an error will occur during compilation; if it is the same as a predefined identifier, no error will occur during compilation, but the original meaning of the predefined identifier is lost.

Go identifier usage guide: convention practices, optimized code Go identifier usage guide: convention practices, optimized code Apr 07, 2024 pm 01:06 PM

Go identifier naming rules: Identifiers must start with a letter or underscore, are case-sensitive, and avoid using keywords. Best practices include using camelCase notation, avoiding abbreviations, and following consistency. Following these rules can improve the readability, maintainability, and quality of your code, thereby improving the understandability of your code base.

What are the allowed symbols for identifiers in PHP? What are the allowed symbols for identifiers in PHP? Sep 18, 2023 pm 02:20 PM

The symbols allowed for identifiers in PHP include letters, numbers, underscores and Chinese characters. Detailed introduction: 1. Letters and numbers. Identifiers can be composed of letters and numbers. They can start with a letter and can be followed by any number of letters, numbers or underscores; 2. Underline. Identifiers can contain underscores, but not underscores. beginning; 3. Chinese characters. Starting from PHP 7.2, Chinese characters are allowed to be used in identifiers. $Chinese variables, function Chinese functions (), etc. are all legal identifiers, etc.

See all articles