[Oracle 工程师手记] ORA-12162 错误 的应对方法


有时候,客户执行 sqlplus 本地连接数据库,有可能发生  ORA-12162 错误。

$ sqlplus / as sysdba

SQL * Plus: Release 12.1.0.2.0 Production on Mon Mar 28 18:29:03 2021

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

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

 
出现这种错误,表明 ORACLE_SID 没有正确设置,设置了正确的 ORACLE_SID 后,
重新 执行 sqlplus / as sysdba ,就可以正确登录了。

posted @ 2021-03-31 20:48  健哥的数据花园  阅读(1187)  评论(0编辑  收藏  举报