ORA-01012: not logged on

ORA-01012: not logged on

一:出现情况:

image

image


二:原因分析:


  1 conn / as sysdba 报错ORA-01012: not logged on
  2 
  3 发生原因:关闭数据库是shutdown 后面没有接关闭参数中的任何一个。
  4 
  5 nomal --->所有连接都断开时才能关闭;
  6 
  7 transactional --->等待事务结束后,主动断开连接;
  8 
  9 immediate --->主动断开事务和连接
 10 
 11 abort --->立刻关闭数据库,这个操作是危险的,不会同步数据,不触发检查点,回滚段直接清 空,相当于掉电,每次启动都要实例恢复。
 12 
 13 所以,数据库关闭很慢,这时我一心急,就直接退出了sqlplus,造成Oracle文件被lock,当我再次startup时,操作失败,因为文件依然被锁定状态。报错ORA-01012: not logged on.
 14 
 15 后来重启服务,就可以用了,看了oracle的报错解释,更让我费解。虽然问题解决了,但是生产环境是不能随便down机的,所以,这个问题待续…
 16 

三:处理方法

  1 kill oracle 进程 或者关掉oracle
  2 
  3 ps -ef|grep ora_dbw0_$ORACLE_SID
  4 
  5 kill -9 pid
  6 
  7 重新启动oracle
  8 
  9 sqlplus sys as sysdba
 10 
 11 startup;
 12 

image


  1 [oracle@localhost ~]$ sqlplus / as sysdba;
  2 
  3 SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 21 09:45:17 2017
  4 
  5 Copyright (c) 1982, 2011, Oracle.  All rights reserved.
  6 
  7 Connected.
  8 ERROR:
  9 ORA-01012: not logged on
 10 Process ID: 0
 11 Session ID: 0 Serial number: 0
 12 
 13 
 14 09:45:17 SYS@orcl  SQL> startup
 15 ORA-01012: not logged on
 16 09:45:29 SYS@orcl  SQL> quit
 17 Disconnected
 18 [oracle@localhost ~]$
 19 [oracle@localhost ~]$
 20 [oracle@localhost ~]$
 21 [oracle@localhost ~]$
 22 [oracle@localhost ~]$ kill oracle
 23 -bash: kill: oracle: arguments must be process or job IDs
 24 [oracle@localhost ~]$ ps -ef|grep ora_dbw0_$ORACLE_SID
 25 oracle    4619     1  0 Dec20 ?        00:00:37 ora_dbw0_orcl
 26 oracle   11382 10996  0 09:47 pts/3    00:00:00 grep ora_dbw0_orcl
 27 [oracle@localhost ~]$ kill -9 4619
 28 [oracle@localhost ~]$ kill 10996
 29 [oracle@localhost ~]$ ps -ef|grep ora_dbw0_$ORACLE_SID
 30 oracle   11386 10996  0 09:47 pts/3    00:00:00 grep ora_dbw0_orcl
 31 [oracle@localhost ~]$ kill 11386
 32 -bash: kill: (11386) - No such process
 33 [oracle@localhost ~]$ ps -ef|grep ora_dbw0_$ORACLE_SID
 34 oracle   11390 10996  0 09:48 pts/3    00:00:00 grep ora_dbw0_orcl
 35 [oracle@localhost ~]$ sqlplus / as sysdba;
 36 
 37 SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 21 09:48:23 2017
 38 
 39 Copyright (c) 1982, 2011, Oracle.  All rights reserved.
 40 
 41 Connected to an idle instance.
 42 
 43 09:48:23 SYS@orcl  SQL> startup
 44 ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
 45 ORACLE instance started.
 46 
 47 Total System Global Area  770035712 bytes
 48 Fixed Size                  1347652 bytes
 49 Variable Size             360714172 bytes
 50 Database Buffers          402653184 bytes
 51 Redo Buffers                5320704 bytes
 52 Database mounted.
 53 ORA-01013: user requested cancel of current operation
View Code

转载于:https://www.cnblogs.com/ios9/p/8078977.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值