oradim新建服务后,登录数据库报ORA-12560错误

> oradim -new -sid mydb
实例已创建。
> sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on 星期二 4月 24 10:22:09 2018

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

SQL> conn /as sysdba
ERROR:
ORA-12560: TNS: 协议适配器错误


SQL> exit
> set oracle_sid=mydb
> sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on 星期二 4月 24 10:29:12 2018

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

SQL> conn /as sysdba
ERROR:
ORA-12560: TNS: 协议适配器错误


SQL> 

  

操作系统是windows。

解决方法:在注册表中添加一项ORACLE_SID

原文地址:https://www.cnblogs.com/abclife/p/8926792.html