The ora 12154 error is reported when plsql is connected to the oracle database.

Source: Internet
Author: User


Plsql connection oracle database reported ora 12154 error today encountered a problem, using sqlplus can connect to a remote database, but the use of plsql is not connected, the error "ORA-12154: TNS: the specified connection identifier www.2cto.com cannot be resolved. Solution: 1. first, check whether the server listening service is enabled. If not, start the listening client: tnsping <tns_name> in Server Linux: #> lsnrctl status check the listening status #> lsnrctl start listener 2. try SQL Plus connection. If SQL Plus connection is successful, it indicates your tnsnames. the ora content is incorrect. I have a space in front of the alias dev_db. You can use a text editor (Edit Plus, UE, etc.) to check whether there are spaces, as long as there is space, it will certainly not work, and if the content appears in the middle of the file, it will lead to all the corresponding connections in the file Failed to connect the alias. If it is at the end, only its own connection alias cannot be successful, and other connection aliases can still be connected successfully. (Note: My tnsnames. ora is configured with the connection of multiple database instances, and all have multiple connection aliases .) For example, space dev_db = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 172.1610.5) (PORT = 1521 ))) (CONNECT_DATA = (SID = ora10) 3. if you make sure that your tnsnames. there is no error in the ora content. delete all the files in the % ORACLE_HOME % \ product \ 10.2.0 \ db_1 \ NETWORK \ ADMIN directory and try again. Note: The files in the directory are dynamically generated when you establish a connection. Do not be afraid of any problems if you delete them. 4. go to the main interface of PLSQL Developer, select cancel on the logon interface to enter the main interface, and then select Tools-Preferences (Preferences) from the menu. In the settings window, select Oracle-Connection. In the corresponding settings window, find Oracle Home (Oracle main directory), select the version of the local client installed, save the settings, and restart PLSQL Developer, then you can log on normally. I used the second solution.

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.