ITPub博客

首页 > 数据库 > Oracle > ORA-12162: TNS:net service name is incorrectly specified

ORA-12162: TNS:net service name is incorrectly specified

原创 Oracle 作者:swq618 时间:2017-02-17 19:01:28 0 删除 编辑
[oracle@orcl ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 16 16:01:35 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-12162: TNS:net service name is incorrectly specified


Enter user-name: sys
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

换一种登录方式
[oracle@orcl ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 16 16:02:53 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL>
SQL>
SQL>
SQL>
SQL> conn sys/oracle as sysdba
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

依然报错
参照了侯胜文大师的一篇文章
http://blog.itpub.net/519536/viewspace-672034/
问题解决
未设置系统环境变量ORACLE_SID
[oracle@orcl ~]$ export ORACLE_SID=orcl

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29674916/viewspace-2133751/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-05-24

  • 博文量
    108
  • 访问量
    289816