Ora-12154_tns Unable to resolve the specified connection identifier

Source: Internet
Author: User

Ora-12154:tns: Unable to resolve the specified connection identifier (original)

I believe that as the Oracle database developers do not encounter "Ora-12154:tns: Unable to resolve the specified connection identifier", today I also encountered a similar situation, my solution to the summary, I hope to be able to meet the same problems of friends to provide help.

Problem Scenario Description:

Server-side version: Oracle 10.2.0.10

Client version: Oracle 10.2.0.10

Client Development tools: PL/SQL Developer

Through the client to connect to the server, the main file is configured by the client's Tnsnames.ora, on the basis of the original file added:

Sid alias =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = server_ip) (PORT = 1521))
)
(Connect_data =
(SID = sid_name)
)
)

Cases:

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

When connecting dev_db via PL/SQL developer, the "Ora-12154:tns: Unable to resolve the specified connection identifier" is reported. (This problem has been encountered before, but the solution is not the same, because the specific problem is not the same.) )

I'll tell you some of the solutions I know:

1. First check whether the server-side monitoring service is turned on, if it is not open, start its monitoring

Client: tnsping <tns_name>
Under Server Linux:

#>lsnrctl Status View monitoring status

#>lsnrctl Start Monitoring

2. Try the SQL plus connection, if the SQL plus connection succeeds, it means that your Tnsnames.ora content is wrong

My problem is in the alias dev_db in front of a space, this can be through a text editor (edit Plus,ue, etc.) to see if there are spaces, as long as there are spaces that is certainly not, and if the content is in the middle of the file, it will cause all the corresponding connection alias in the file is unsuccessful , if it is on the last side only its own connection alias is not successful, the other connection alias is still able to connect successfully. (Note: My Tnsnames.ora is configured with multiple DB instance connections, all with multiple connection aliases.) )

Such as:

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

3. If you make sure 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, then reconnect, you can generally solve the problem.

Note: The file in that directory is generated dynamically when you establish a connection, do not be afraid to delete the problem

4. Enter the main interface of the Plsql developer, select Cancel on the login screen without logging into the main interface, then select Menu Tools (Tools)-preferences (preferences), in the Settings window, select Oracle-connection (Connect), In the corresponding Settings window, locate the Oracle Home (Oracle home directory), select the version of the client that you installed locally, save the settings, and then restart Plsql Developer, then you can log in normally.

If you also touch the ORA-12154: error code for other reasons and there are other workarounds, please keep abreast comments I will be perfecting this article! Thank you!

Ora-12154_tns Unable to resolve the specified connection identifier

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.