新安装的数据库,本地验证登陆报错如下:
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 28 01:35:43 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
原因为没有export ORACLE_SID
export ORACLE_SID 并写入.bash_profile即可登陆了。
[oracle@rac1 ~]$ export ORACLE_SID=snaid
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 28 02:06:27 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options