Plsql Connect Oracle Database report ora 12154 error Resolution _oracle

Source: Internet
Author: User
Tags aliases
Plsql Connect Oracle Database ora 12154 error
Today encountered a problem, using Sqlplus can connect to the remote database, but the use of plsql but not connected, error "ORA-12154:TNS: Unable to resolve the specified connection identifier"

The workaround is as follows
1. Check that the server-side listening service is turned on, and if it is not turned on, start its listening
Client: tnsping <tns_name>
Server Linux:
#>lsnrctl Status View listening status
#>lsnrctl Start Start listening
2. Connect through SQL Plus if the SQL plus connection succeeds, it means your tnsnames.ora content is faulty. My problem is in the alias dev_db, which is preceded by a space, which can be done by a text editor (edit Plus,ue, etc.) To see if there are spaces, as long as there are spaces that must not be, and if that piece of content appears in the middle of the file, it will cause all the corresponding connection aliases in the file to be unsuccessful, and if the only connection alias on the last side is not successful, the other connection alias can still connect successfully. (Note: My Tnsnames.ora is configured with multiple database instance connections, all of which have multiple connection aliases.) )
such as: space
Copy Code code as follows:

dev_db =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 172.168.10.5) (PORT = 1521))
(Connect_data =
(SID = ora10)
)
)

3. If you ensure that your Tnsnames.ora content is not wrong, then please delete all the files in the%oracle_home%\product\10.2.0\db_1\network\admin directory, and then reconnect, generally can be resolved. Description: The file in that directory is generated dynamically when you establish the connection, don't be afraid to delete the problem
4. Enter the main interface of the Plsql developer, select Cancel in the login interface to enter the main interface, then select the menu Tools (Tools)-preferences (preferences), in the Settings window, select Oracle-connection (Connection), In the corresponding Settings window, locate the Oracle home directory, select the version of your locally installed client, save the settings, and then restart Plsql Developer, where you can log on normally.
I solved it using the second method.
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.