ORA-01012:not logged on的解决办法

ORA-01012:not logged on的解决办法 

发生原因:关闭数据库是shutdown 后面没有接关闭参数中的任何一个。
 

 nomal          --->所有连接都断开时才能关闭;

 transactional  --->等待事务结束后,主动断开连接;

 immediate      --->主动断开事务和连接  www.2cto.com  

 abort          --->立刻关闭数据库,这个操作是危险的,不会同步数据,不触发检查点,回滚段直接清  空,相当于掉电,每次启动都要实例恢复。

所以,数据库关闭很慢,这时我一心急,就直接退出了sqlplus,造成oracle文件被lock,当我再次startup时,操作失败,因为文件依然被锁定状态。报错ORA-01012: not logged on。

后来重启服务,就可以用了,看了oracle的报错解释,更让我费解。虽然问题解决了,但是生产环境是不能随便down机的,所以,这个问题待续。。。

kill oracle 进程

Last login: Mon Jun 11 16:47:45 2018 from 192.168.1.180
-bash: ulimit: open files: cannot modify limit: Operation not permitted
[oracle@server88 ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-JUN-2018 16:53:00

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

TNS-01106: Listener using listener name LISTENER has already been started
[oracle@server88 ~]$ ps -ef |grep ora_dbw0_                      --ps:选项;grep命令是查找
oracle    2833     1  0 May30 ?        00:01:03 ora_dbw0_orcl11g
oracle    8533  8506  0 16:53 pts/1    00:00:00 grep ora_dbw0_
[oracle@server88 ~]$ kill -9 2833
[oracle@server88 ~]$ ps -ef |grep ora_dbw0_
oracle    8537  8506  0 16:54 pts/1    00:00:00 grep ora_dbw0_
[oracle@server88 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 11 16:55:11 2018

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2087780352 bytes
Fixed Size                  2214936 bytes
Variable Size            1593836520 bytes
Database Buffers          486539264 bytes
Redo Buffers                5189632 bytes
Database mounted.
Database opened.
原文地址:https://www.cnblogs.com/person008/p/9172231.html