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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM