TNS: cocould not resolve the connect identifier specified

Source: Internet
Author: User

Today, I went to the lab to connect to the database and found that it was not OK. In sqlplus, the user name and password can be connected, but the user name @ orcl cannot be connected, and the error shown in the title is displayed, after several minutes, I finally got it done. I 'd like to record it for future reference.

 

Cause: because the computer in my lab was originally from a young teacher in the teacher's house, it was well configured and just caught up with him for a year abroad, and boss asked me to use the computer first. However, the existing data in the database cannot be moved. However, I have to reinstall a database to another disk. It's okay after the transfer, however, since Oracle services occupy a lot of memory at startup, these services are shut down when you do not need databases at ordinary times... However, the above errors were caused by various hard work and later I was unable to connect to the system.

Solution: we can see that the newly installed database is too large to end and simply delete it. We will use the database of the original teacher to create a new user and an independent tablespace. When he comes back, I will delete it. Find and delete the Oracle Installation ProductProgramAnd then select the program you want to delete, and then change the environment variable. (I checked the Internet and found that many of my cases were due to the original database, and then installed another database, errors in system environment variables ). Directly delete all the system environment variables related to Oracle, And then you can see the system environment variables in the "Environment" tab on the right of the deleted program, confirm that the address of ORACLE_HOME points to the location where you installed the database, and click the Application below to add this to the environment variable, and then you can use it normally. At this time, the username @ orcl is certainly no problem. If the program, especially Silverlight, uses the Web to connect to the database, it is OK to exit Vs and repeat it!

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.