首页 > 数据库 > Oracle > solaris ORA-12162
ORA-12162 "TNS:service name is incorrectly specified"
solaris 系统重启后,在本机 sqlplus / as sysdba 无法登录。
$echo ORACLE_SID
yp
oracle sid 已经设置,但是还是无法登陆,问题依旧。
$sqlplus /nolog 登陆
SQL>host echo $ORACLE_SID #为空,oracle 没有取到系统的oracle_sid
SQL>
SQL>
$../.proifle 无错,但host echo $ORACLE_SID还是没有东西。
不行就切换bash
$bash
. ./.profile
SQL>host echo $ORACLE_SID
yp
可以读取到了,看来换个bash 就行了。也不知solaris 用的那个shell 。查看shell 用echo $SHELL 就可以了。
$sqlplus / as sysdba 成功.
[@more@]来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12591949/viewspace-1031664/ ,如需转载,请注明出处,否则将追究法律责任。