Failure phenomenon
1)Try to log in to the system using the system user, and then you will receive the following error message
[oracle@asdlabdb01 ~]$ sqlplus system/sys
SQL*Plus: Release 10.2.0.3.0 – Production on Sat Aug 27 22:54:02 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
2) Login as sysdba will get the same error message
[oracle@asdlabdb01 ~]$ sqlplus/as sysdba
SQL*Plus: Release 10.2.0.3.0 – Production on Sat Aug 27 22:54:48 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
3) But at this time, if you use the service name method to connect to the database, it is possible to succeed, and this is the weirdness of the phenomenon of the problem.
[oracle@asdlabdb01 ~]$ sqlplus system/sys@ora10g
SQL*Plus: Release 10.2.0.3.0 – Production on Sat Aug 27 22:53:41 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Solution:
The reason behind the bizarre failure is surprisingly basic like that: ORACLE_SID is not specified!
Confirm the system’s current ORACLE_HOME and ORACLE_SID environment variables
[oracle@asdlabdb01 ~]$ echo $ORACLE_HOME
/oracle/app/oracle/product/10.2.0/db_1
[oracle@asdlabdb01 ~]$ echo $ORACLE_SID
[oracle@asdlabdb01 ~]$
As you can see, only the ORACLE_HOME environment variable is set at this point, but ORACLE_SID is empty at this point, which is the real cause of the problem.
Similar Posts:
- Oracle ORA-12162: TNS:net service name is incorrectly specified
- RMAN Login Error: ORA-12162:TNS:net service name is incorrectly specified
- [Solved] Linux Oracle bash: “sqlplus / as sysdba”: command not found
- [Solved] Tns-12555: TNS: permission denied error resolution
- Oracle can’t be used after login. Connected to an idle instance is displayed
- ORA-12528: TNS:listener: all appropriate instances are blocking new connections
- How to Solve ORA-01089 error: immediate shutdown in progress
- Oracle 11gr2 RAC database cannot be connected (ora-12537: TNS: connection closed)
- oracle ORA-39700: database must be opened with UPGRADE option
- How to Solve ORA-21561 Error: OID generation failed