[Oracle error collection]: ORA-12154: TNS: Unable to parse the specified connection identifier, ora-12154tns

Source: Internet
Author: User

[Oracle error collection]: ORA-12154: TNS: Unable to parse the specified connection identifier, ora-12154tns

I believe this error is not unfamiliar to everyone. As long as Oracle is installed and used, it is estimated that this problem has been encountered. It usually occurs when PL/SQL is used to connect to the Oracle database.
The cause of this error and the solution is a variety of, I have encountered this problem three times and five times, today I will summarize the ORA-12154 solution.

1. Check whether the server, Oracle service, and listener service are enabled. Win + R, enter services. msc, and view the service. Check whether two services are running.


2. Try connecting to the database through SQL Plus to eliminate server errors. If the SQL Plus connection succeeds, it indicates that the installation process is correct and the database can be used properly. The error lies in some configurations.

3. If sqlplus can successfully log on to the server to prove that there is no problem, check the configuration and check the Oracle Installation Directory: D: \ app \ NiuNiu \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN tnsnames. whether the relevant connection descriptor is configured in the ora file. That is, check whether a new network service is configured.
Specific configuration see blog: http://blog.csdn.net/u010028869/article/details/46652165

In addition, pay attention to the network service name. For example, DRP cannot have spaces before, and there can be blank lines between two services, but there cannot be space characters. It may not be recognized if there are spaces. As shown in:

4. Check the Environment Variable-system variable Path and whether the Oracle installation directory is available: D: \ app \ NiuNiu \ product \ 11.2.0 \ dbhome_1 \ bin; this variable is automatically generated when Oracle is installed. It is best to check it out for the sake of insurance.


5. If Oracle 10 Gb is installed, open PL/SQL. After canceling the login, find "Tools-> Preferences" in the PLSQL Developer toolbar ", on the Connection node of Oracle, locate Oracle Home and select OraClient10g_home1. Save the settings and disable PLSQL Developer, as shown in:


6. For Oracle11g, check whether the Oracle 32-bit client is installed and whether the corresponding environment variables are configured. For specific configuration, see the article: http://blog.csdn.net/u010028869/article/details/46647479


7. If the above methods do not work after the attempt, try to replace the plsql version. It is possible that plsql is not compatible with the installed Oracle database version.


These are the solutions that I have come up with. I hope they can help you!

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.