ORA-01012:not logged on的解决办法
conn / as sysdba 报错ORA-01012: not logged on
发生原因:在我关闭
数据库shutdown immediate 的时候,因为要关闭其他的进程,数据库关闭很慢,这时我一心急,就直接退出了sqlplus,造成oracle文件被lock,当我再次startup时,操作失败,因为文件依然被锁定状态。报错ORA-01012: not logged on。
此时我查看了一下操作系统进程
oracle 9814 9784 0 14:23 pts/1 00:00:00 sqlplus as sysdba
oracle 9824 9814 0 14:23 ? 00:00:00 oracleENMOEDU (DESCRIPTION=(LOCA
oracle 9827 9780 0 14:23 pts/2 00:00:00 bash
oracle 9814 9784 0 14:23 pts/1 00:00:00 sqlplus as sysdba
oracle 9824 9814 0 14:23 ? 00:00:00 oracleENMOEDU (DESCRIPTION=(LOCA
oracle 9827 9780 0 14:23 pts/2 00:00:00 bash
然后我kill 掉 服务数据库就可以启动了
kill -9 9824
kill -9 9824
[oracle@ENMOEDU ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sat May 23 14:38:11 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Conected to an idle instance.
sql > startup
继续报错 ORA-01012: not logged on
此时我继续ps - ef
oracle 9490 1 0 14:10 ? 00:00:01 ora_ckpt_ENMOEDU
oracle 9492 1 0 14:10 ? 00:00:00 ora_smon_ENMOEDU
oracle 9494 1 0 14:10 ? 00:00:00 ora_reco_ENMOEDU
我们把 smon 进程杀掉 因为SMON 进程是最快的
kill -9 9492
再 sqlplus / as sysdba
startup
此时数据库正常启动
SQL*Plus: Release 11.2.0.3.0 Production on Sat May 23 14:38:11 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Conected to an idle instance.
sql > startup
继续报错 ORA-01012: not logged on
此时我继续ps - ef
oracle 9490 1 0 14:10 ? 00:00:01 ora_ckpt_ENMOEDU
oracle 9492 1 0 14:10 ? 00:00:00 ora_smon_ENMOEDU
oracle 9494 1 0 14:10 ? 00:00:00 ora_reco_ENMOEDU
kill -9 9492
再 sqlplus / as sysdba
startup
此时数据库正常启动
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30176559/viewspace-1668454/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30176559/viewspace-1668454/