Using Plsql, you cannot connect to the database with Userid/pwd@sid. Environment variables need to be set

Source: Internet
Author: User

"Turn from: http://blog.csdn.net/meng090914/article/details/4720240"

ORA-12154: tns:could not resolve the connect identifier specified, the specified connection cannot be resolved identifier. This indicates a lack of an environmental variable ,tns_admin.

Problem encountered: My oracle10g database is installed on my Linux virtual machine, I usually use the full connection string to connect in the native connection,

When using Userid/[email protected] connection error:ORA-12154: tns:could not resolve the connect identifier Specified

Workaround: Right-click the user variable---Properties--advanced-environment variable -- The variable name is: Tns_admin

the value of the variable is:%oracle_home%/network/admin/ where%oracle_home% is the Orcale installation path,

In fact, the value of this environment variable is set to the path where the Tnsnames.ora file is located, set < Span style= "font-family: the song Body;" >tns_admin change < Span style= "font-family: the song Body;" > in order to be able to find tnsnames.ora. If oracle is installed on this machine, and oracle_home Environment Change , the Tnsnames.ora file is automatically found in the%oracle_home%/network/admin/location .

Using Plsql cannot connect to the database using only Userid/[email protected] . Environment variables need to be set

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.