ORA-12162: TNS: net service name is incorrectly specified how to solve the error ?, Ora-12162tns

Source: Internet
Author: User

ORA-12162: TNS: net service name is incorrectly specified how to solve the error ?, Ora-12162tns

"ORA-12162: TNS: net service name is incorrectly specified" appears today when you log on to sqlplus using an oracle user ".

As follows:

[oracle@oracle ~]$ sqlplusSQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 29 19:19:26 2012Copyright (c) 1982, 2005, Oracle.  All rights reserved.Enter user-name: sysEnter password:ERROR:ORA-12162: TNS:net service name is incorrectly specified

The online query is because the ORACLE_SID environment variable is not set.

1. Check whether environment variables are set. Use "echo $ ORACLE_SID" to query them, as shown below:

[oracle@oracle ~]$ echo $ORACLE_SID [oracle@oracle ~]$

2. Set the environment variables and run the "vi. bash_profile" Edit command to add "export ORACLE_SID = oracle13g ".

3. Run the "source. bash_profile" command to make the environment variable take effect.

4. Use the oracle user to log on to sqlplus. As follows:

[oracle@oracle ~]$ sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 29 19:41:43 2012Copyright (c) 1982, 2005, Oracle.  All rights reserved.SQL> conn /as sysdbaConnected to an idle instance.

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.