标题: ORA-12162:TNS:net service name is incorrectly specified错误 [打印本页] 作者: jiawang 时间: 2018-1-18 15:33 标题: ORA-12162:TNS:net service name is incorrectly specified错误 本帖最后由 jiawang 于 2018-1-18 15:40 编辑
今天使用oracle用户登录sqlplus出现“ORA-12162: TNS:net service name is incorrectly specified”。
[oracle@strong ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 18 15:08:19 2018
Copyright (c) 1982, 2013, 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
export PATH
[oracle@strong ~]$
手动设置oralce_sid
[oracle@strong ~]$ export ORACLE_SID=YADATA
[oracle@strong ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 18 15:18:13 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
验证数据库状态:
SQL> select status,instance_name from v$instance;
STATUS INSTANCE_NAME
------------ ----------------
OPEN YADATA