ORA-12154: TNS: couldnotresolvetheconnectidentifierspecified

Source: Internet
Author: User

Oracleinitialization

Solve the Initialization error cocould not load problem. Another problem occurs when the login interface is complete with information for logon.ORA-12154:TNS: cocould not resolve the connect identifier specified, that isThe specified connection identifier cannot be resolved. This indicates that an environment variable is missing,TNS_ADMIN.

Solution: Right-click my computer and choose Properties> advanced> environment variable> Administrator user variable> new. The variable name is TNS_ADMIN.

Variable value: % ORACLE_HOME %/NETWORK/ADMIN/

Here, % ORACLE_HOME % is the Orcale installation path. In fact, the value of this environment variable is tnsnames. the path where the ora file is located, especially after reinstallation or other operations. If you forget to set the TNS_ADMIN variable, the PL/SQL logon will report the error "unable to parse the specified connection identifier, the TNS_ADMIN variable is set to locate tnsnames. ora. If ORACLE is installed on the local machine and the ORACLE_HOME environment variable is set, the tnsnames. ora file is automatically located in % ORACLE_HOME %/NETWORK/ADMIN.

[Oracle @ yidongapptestdb ~] $ Cat. bash_profile
#. Bash_profile

# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi

# User specific environment and startup programs

PATH = $ PATH: $ HOME/bin

Export PATH

TMP =/tmp; export TMP
TMPDIR = $ TMP; export TMPDIR
ORACLE_HOSTNAME = yidongapptestdb; export ORACLE_HOSTNAME
ORACLE_UNQNAME = MIBD11G; export ORACLE_UNQNAME
ORACLE_BASE =/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID = MIBD11G; export ORACLE_SID
PATH =/usr/bin: $ PATH; export PATH
PATH = $ ORACLE_HOME/bin: $ PATH; export PATH
LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH = $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib; export CLASSPATH
Export TNS_ADMIN =/u01/app/oracle/product/11.2.0/db_1/network/admin
[Oracle @ yidongapptestdb ~] $

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.