1. Fault description
I'm free today. An Oracle test server is installed on Linux, and the installation is complete when you log in using SYSDBA you encounter problems
[Email protected] ~]$ Sqlplus/as SYSDBA
Sql*plus:release 11.2.0.1.0 Production on Fri 29 22:32:46 2014
Copyright (c) 1982, Oracle. All rights reserved.
ERROR:
Ora-12162:tns:net Service name is incorrectly specified
2. Failure analysis
Confirm Oracle_home and ORACLE_SID environment variable parameters
[Email protected] ~]$ echo $ORACLE _home
/u01/app/oracle/product/11.2.0/dbhome_1
[Email protected] ~]$ echo $ORACLE _sid
[Email protected] ~]$
Oracle_sid No display
3. Fault resolution
Add Oracle_sid parameter
[Email protected] ~]$ export ORACLE_SID=ORCL
[Email protected] ~]$ echo $ORACLE _sid
Orcl
Test Connection Login Sysdba
[Email protected] ~]$ Sqlplus/as SYSDBA
Sql*plus:release 11.2.0.1.0 Production on Fri 29 22:35:08 2014
Copyright (c) 1982, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options
Sql> exit
This article is from the "write-free" blog, please be sure to keep this source http://zymin0823.blog.51cto.com/990123/1546546
Linux Oracle Boot Sqlplus cannot connect