關閉oracle異常:ORA-01012: not logged on
今天是2014年的最後一天,此時此刻加班中,公司大廈停電,所有的伺服器都要關閉。
在對一個生產庫做shutdown immediate 的時候,可能是因為網路掉線了,導致正在shutdown的時候出現異常。當時看著一直卡在shutdown immediate,本以為是需要的時間長一點,但是十分鐘後還是卡在那裡,於是去看alert,結果alert也沒有更新:
Private strand flush not complete
Current log# 7 seq# 92151 mem# 0: /u02/logfile/redo71.log
Current log# 7 seq# 92151 mem# 1: /u03/logfile/redo72.log
Thread 1 advanced to log sequence 92152 (LGWR switch)
Current log# 8 seq# 92152 mem# 0: /u04/logfile/redo81.log
Current log# 8 seq# 92152 mem# 1: /u02/logfile/redo82.log
Wed Dec 31 20:02:45 2014
Shutting down instance (immediate)
Stopping background process SMCO
Shutting down instance: further logons disabled
Wed Dec 31 20:03:05 2014
Stopping background process CJQ0
Wed Dec 31 20:03:05 2014
Stopping background process QMNC
Stopping background process MMNL
Stopping background process MMON
License high water mark = 153
All dispatchers and shared servers shutdown
ALTER DATABASE CLOSE NORMAL
然後想重新sqlplus 連進入 去再次shutdown。可以出現這樣的情況:
[oracle@zhanglin ~]$ export ORACLE_SID=zhanglin
[oracle@zhanglin ~]$ hostname
zhanglin
[oracle@zhanglin ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 31 20:11:57 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected.
SQL> shutdown
ORA-01012: not logged on
SQL>
SQL> startup
ORA-01012: not logged on
SQL>
檢視後臺程式時oracle還在:
[oracle@zhanglin ~]$ ps -ef | grep oracle
root 14422 25243 0 18:06 ? 00:00:00 sshd: oracle [priv]
oracle 14424 14422 0 18:06 ? 00:00:00 sshd:
oracle 14425 14424 0 18:06 pts/2 00:00:00 -bash
oracle 16150 1 6 20:02 ? 00:00:36 oraclezhanglin (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
root 16165 25243 0 20:08 ? 00:00:00 sshd: oracle [priv]
root 16167 25243 0 20:08 ? 00:00:00 sshd: oracle [priv]
oracle 16169 16165 0 20:08 ? 00:00:00 sshd:
oracle 16170 16167 0 20:08 ? 00:00:00 sshd:
oracle 16171 16170 0 20:08 pts/1 00:00:00 -bash
oracle 16172 16169 0 20:08 pts/4 00:00:00 -bash
oracle 16230 16171 0 20:09 pts/1 00:00:00 tail -f alert_zhanglin.log
oracle 16280 16172 0 20:11 pts/4 00:00:00 sqlplus as sysdba
root 16284 25243 0 20:11 ? 00:00:00 sshd: oracle [priv]
oracle 16286 16284 0 20:11 ? 00:00:00 sshd:
oracle 16287 16286 0 20:11 pts/3 00:00:00 -bash
oracle 16316 16287 0 20:11 pts/3 00:00:00 tail -f alert_zhanglin.log
oracle 16318 16280 0 20:11 ? 00:00:00 oraclezhanglin (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 16320 16280 0 20:11 pts/4 00:00:00 /bin/bash
oracle 16346 16320 0 20:11 pts/4 00:00:00 sqlplus as sysdba
oracle 16348 16346 0 20:11 ? 00:00:00 oraclezhanglin (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 16378 16346 0 20:12 pts/4 00:00:00 /bin/bash
oracle 16402 16378 0 20:12 pts/4 00:00:00 ps -ef
oracle 16403 16378 0 20:12 pts/4 00:00:00 grep oracle
oracle 25738 1 0 Dec25 ? 00:00:50 ora_pmon_zhanglin
oracle 25740 1 0 Dec25 ? 00:00:12 ora_psp0_zhanglin
oracle 25742 1 0 Dec25 ? 00:00:00 ora_vktm_zhanglin
oracle 25746 1 0 Dec25 ? 00:00:00 ora_gen0_zhanglin
oracle 25748 1 0 Dec25 ? 00:00:00 ora_diag_zhanglin
oracle 25750 1 0 Dec25 ? 00:00:00 ora_dbrm_zhanglin
oracle 25752 1 0 Dec25 ? 00:43:48 ora_dia0_zhanglin
oracle 25754 1 0 Dec25 ? 00:00:21 ora_mman_zhanglin
oracle 25756 1 0 Dec25 ? 00:09:17 ora_dbw0_zhanglin
oracle 25758 1 0 Dec25 ? 00:08:18 ora_dbw1_zhanglin
oracle 25760 1 0 Dec25 ? 00:08:17 ora_dbw2_zhanglin
oracle 25762 1 0 Dec25 ? 00:08:26 ora_dbw3_zhanglin
oracle 25764 1 0 Dec25 ? 00:08:01 ora_dbw4_zhanglin
oracle 25766 1 0 Dec25 ? 00:08:37 ora_dbw5_zhanglin
oracle 25768 1 0 Dec25 ? 00:07:47 ora_dbw6_zhanglin
oracle 25770 1 0 Dec25 ? 00:08:01 ora_dbw7_zhanglin
oracle 25772 1 0 Dec25 ? 00:08:24 ora_dbw8_zhanglin
oracle 25774 1 0 Dec25 ? 00:08:10 ora_dbw9_zhanglin
oracle 25776 1 0 Dec25 ? 00:08:29 ora_dbwa_zhanglin
oracle 25778 1 0 Dec25 ? 00:08:40 ora_dbwb_zhanglin
oracle 25780 1 0 Dec25 ? 00:08:26 ora_dbwc_zhanglin
oracle 25782 1 0 Dec25 ? 00:07:55 ora_dbwd_zhanglin
oracle 25784 1 0 Dec25 ? 00:08:15 ora_dbwe_zhanglin
oracle 25786 1 0 Dec25 ? 00:08:40 ora_dbwf_zhanglin
oracle 25788 1 0 Dec25 ? 01:01:25 ora_lgwr_zhanglin
oracle 25790 1 0 Dec25 ? 00:06:00 ora_ckpt_zhanglin
oracle 25792 1 0 Dec25 ? 00:01:41 ora_smon_zhanglin
oracle 25794 1 0 Dec25 ? 00:00:00 ora_reco_zhanglin
此時就沒轍了。
沒辦法不得不採用強制手段了。
1、shutdown abort
2、kill -9 oracle 程式 方法:ps -ef|grep ora_dbw0_$_SID 找到這個程式 直接kill 掉。
[oracle@zhanglin dblog]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 31 20:22:58 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected.
SQL> shutdown abort
ORACLE instance shut down.
SQL>
後來startup了一次,可以正常起來,然後在shutdown immediate 正常關閉。謝天謝地!
2015年1月1號,元旦三天 加班中度過。。。祝所有的技術人員 新年快樂,事事順利!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30936525/viewspace-2016673/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 未完全關閉資料庫導致ORA-01012: not logged的解決資料庫
- ORA-01012: not logged on 解決辦法
- sqlplus / as sysdba 遇到ora-01012 no logged onSQL
- vmware虛擬機器異常關閉處理虛擬機
- SCN異常增長導致資料庫異常關閉風險的防範資料庫
- oracle 異常Oracle
- eclipse異常關閉 導致tomcat 6.0 無法重啟EclipseTomcat
- oracle 使用異常exceptionOracleException
- oracle異常處理Oracle
- Oracle中RAISE異常OracleAI
- Oracle 處理異常Oracle
- oracle異常彙總Oracle
- 我為 Netty 貢獻原始碼 | 且看 Netty 如何應對 TCP 連線的正常關閉,異常關閉,半關閉場景Netty原始碼TCP
- 關注程式異常流
- oracle預定義異常Oracle
- oracle 異常處理 exceptionOracleException
- ORACLE中的異常(轉)Oracle
- 【轉】Oracle 異常處理Oracle
- 關於NoClassDefFoundError和ClassNotFoundException異常ErrorException
- ORACLE AS 自動關閉Oracle
- [20210722]資料庫異常關閉的處理.txt資料庫
- oracle常見異常等待——latch處理思路Oracle
- Oracle 監聽異常處理Oracle
- oracle主動丟擲異常Oracle
- Oracle異常錯誤處理Oracle
- ORACLE 異常錯誤處理Oracle
- oracle異常:library cache lockOracle
- Oracle ASM異常dismount磁碟組OracleASM
- 【PARANETERS】Oracle異常恢復相關的隱含引數Oracle
- 資料庫異常關閉後無法啟動問題處理一例資料庫
- oracle啟動與關閉Oracle
- ORACLE DataGuard 關閉啟動Oracle
- 關閉自動收集 for oracleOracle
- Oracle:異常ORA-01950Oracle
- Oracle JOB異常中斷原因分析Oracle
- Oracle自定義異常的使用薦Oracle
- oracle異常捕獲程式碼(轉)Oracle
- Flutter異常監控 - 伍 | 關於異常監控框架設計的思考Flutter框架