[Email protected] ~]# su-oracle
[Email protected] ~]$ sqlplus '/as sysdba '
Sql*plus:release 11.2.0.1.0 Production on Tue APR 22 17:10:52 2014
Copyright (c) 1982, Oracle. All rights reserved.
ERROR:
Ora-12162:tns:net Service name is incorrectly specified
Enter User-name:
ERROR:
Ora-12162:tns:net Service name is incorrectly specified
Enter User-name:
ERROR:
Ora-12162:tns:net Service name is incorrectly specified
Sp2-0157:unable to CONNECT to ORACLE after 3 attempts, exiting Sql*plus
[Email protected] ~]$ export Oracle_sid=prod
//Add the instance name to the environment variable, indicating that you need to manually set
[Email protected] ~]$ sqlplus '/as sysdba '
Sql*plus:release 11.2.0.1.0 Production on Tue APR 22 17:11:16 2014
Copyright (c) 1982, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production
With the partitioning, OLAP, Data Mining and Real application testing options
Sql> select Status,instance_name from V$instance; Query status after login, normal
STATUS instance_name
------------ ----------------
OPEN PROD