標籤:
本文轉自:http://www.cnblogs.com/zhwl/p/3726003.html
一個小小的問題,讓我折騰了一個上午,下午三點徹底解決了,分享一個給大家解決方案,儘管在測試伺服器上,但是經驗是值得總結和分享的.
ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist 進程 ID: 0 會話 ID: 0 序號: 0
---- 這個是現象。
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 3月 18 15:30:38 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR: ORA-01031: insufficient privileges
請輸入使用者名稱: sys as sysdba 輸入口令: 已串連到空閑常式。
SQL> show parameter; ORA-01034: ORACLE not available 進程 ID: 0 會話 ID: 0 序號: 0
SQL> select group#,sequence#,members,archived,status from v$log; select group#,sequence#,members,archived,status from v$log * 第 1 行出現錯誤: ORA-01034: ORACLE not available 進程 ID: 0 會話 ID: 0 序號: 0 -----
這個過程中我參考很多資料,無法解決
SQL> startup open hstestdb ORACLE 常式已經啟動。
Total System Global Area 6847938560 bytes Fixed Size 2188768 bytes Variable Size 3422554656 bytes Database Buffers 3405774848 bytes Redo Buffers 17420288 bytes 資料庫裝載完畢。 ORA-03113: 通訊通道的檔案結尾 進程 ID: 2984 會話 ID: 5 序號: 3
-----
還是報ORA-03113: 通訊通道的檔案結尾,究竟什麼原因?
SQL> startup open hstestdb ORACLE 常式已經啟動。
Total System Global Area 6847938560 bytes Fixed Size 2188768 bytes Variable Size 3422554656 bytes Database Buffers 3405774848 bytes Redo Buffers 17420288 bytes 資料庫裝載完畢。 ORA-03113: 通訊通道的檔案結尾 進程 ID: 2984 會話 ID: 5 序號: 3
SQL> exit 從 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 斷 開
C:\Documents and Settings\Administrator>set oracle_sid=hstestdb
C:\Documents and Settings\Administrator>sqlplus "/as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 3月 18 15:37:02 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR: ORA-01031: insufficient privileges
請輸入使用者名稱: sys as sysdba 輸入口令: 已串連到空閑常式。
SQL> stop SP2-0042: 未知命令 "stop" - 其餘行忽略。 SQL> shutdown immediate; ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist SQL> startup mount; ORACLE 常式已經啟動。
Total System Global Area 6847938560 bytes Fixed Size 2188768 bytes Variable Size 3422554656 bytes Database Buffers 3405774848 bytes Redo Buffers 17420288 bytes 資料庫裝載完畢。 SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC ---------- ---------- ---------- ---------- ---------- ---------- --- STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME ---------------- ------------- -------------- ------------ -------------- 1 1 3823 52428800 512 1 NO CURRENT 34344047 12-3月 -13 2.8147E+14
3 1 3822 52428800 512 1 NO INACTIVE 34327500 12-3月 -13 34344047 12-3月 -13
2 1 3821 52428800 512 1 NO INACTIVE 34324562 12-3月 -13 34327500 12-3月 -13
SQL> alter database open; alter database open * 第 1 行出現錯誤: ORA-03113: 通訊通道的檔案結尾 進程 ID: 2592 會話 ID: 5 序號: 7
SQL> alter database archivelog; ERROR: ORA-03114: 未串連到 ORACLE
SQL> select * from v$log; ERROR: ORA-03114: 未串連到 ORACLE
SQL> conn sys/sys as sysdba 已串連到空閑常式。 SQL> select * from v$log; select * from v$log * 第 1 行出現錯誤: ORA-01034: ORACLE not available 進程 ID: 0 會話 ID: 0 序號: 0
SQL> archive log list; ORA-01012: not logged on SQL> exit 已中斷連線
C:\Documents and Settings\Administrator>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 18-3月 -2013 15:4 4:24
Copyright (c) 1991, 2010, Oracle. All rights reserved.
正在串連到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hserptest)(PORT=1521))) LISTENER 的 STATUS ------------------------ 別名 LISTENER 版本 TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ ction 啟動日期 18-3月 -2013 15:30:27 正常已耗用時間 0 天 0 小時 14 分 0 秒 追蹤層級 off 安全性 ON: Local OS Authentication SNMP OFF 監聽程式參數檔案 D:\app\Administrator\product\11.2.0\dbhome_1\network\a dmin\listener.ora 監聽程式記錄檔 d:\app\administrator\diag\tnslsnr\hserptest\listener\a lert\log.xml 監聽端點概要... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hserptest)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc))) 服務摘要.. 服務 "CLRExtProc" 包含 1 個執行個體。 執行個體 "CLRExtProc", 狀態 UNKNOWN, 包含此服務的 2 個處理常式... 服務 "hstestdb" 包含 1 個執行個體。 執行個體 "hstestdb", 狀態 UNKNOWN, 包含此服務的 1 個處理常式... 命令執行成功
C:\Documents and Settings\Administrator>sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 3月 18 15:45:23 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR: ORA-01031: insufficient privileges
請輸入使用者名稱: sys/sys as sysdba 已串連到空閑常式。
SQL> select * from v$log; select * from v$log * 第 1 行出現錯誤: ORA-01034: ORACLE not available 進程 ID: 0 會話 ID: 0 序號: 0
SQL> alter database open resetlog; alter database open resetlog * 第 1 行出現錯誤: ORA-01034: ORACLE not available 進程 ID: 0 會話 ID: 0 序號: 0
SQL> alter database open resetlogs; alter database open resetlogs * 第 1 行出現錯誤: ORA-01034: ORACLE not available 進程 ID: 0 會話 ID: 0 序號: 0
SQL> shutdown immedate; SP2-0717: 非法的 SHUTDOWN 選項 SQL> shutdown immediate ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist SQL> startup mount; ORACLE 常式已經啟動。
Total System Global Area 6847938560 bytes Fixed Size 2188768 bytes Variable Size 3422554656 bytes Database Buffers 3405774848 bytes Redo Buffers 17420288 bytes 資料庫裝載完畢。
SQL> alter database open resetlogs; alter database open resetlogs * 第 1 行出現錯誤: ORA-01139: RESETLOGS 選項僅在不完全資料庫恢複後有效
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC ---------- ---------- ---------- ---------- ---------- ---------- --- STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME ---------------- ------------- -------------- ------------ -------------- 1 1 3823 52428800 512 1 NO CURRENT 34344047 12-3月 -13 2.8147E+14
3 1 3822 52428800 512 1 NO INACTIVE 34327500 12-3月 -13 34344047 12-3月 -13
2 1 3821 52428800 512 1 NO INACTIVE 34324562 12-3月 -13 34327500 12-3月 -13
SQL> alter database open resetlogs; alter database open resetlogs * 第 1 行出現錯誤: ORA-01139: RESETLOGS 選項僅在不完全資料庫恢複後有效
SQL> SQL> recover database until time ‘2013-03-01 12:12:12‘; 完成介質恢複。
---
我恢複3月1日的 SQL> alter database open resetlogs;
資料庫已更改。
SQL> shutdown 資料庫已經關閉。 已經卸載資料庫。 ORACLE 常式已經關閉。 SQL> startup ORACLE 常式已經啟動。
Total System Global Area 6847938560 bytes Fixed Size 2188768 bytes Variable Size 3422554656 bytes Database Buffers 3405774848 bytes Redo Buffers 17420288 bytes 資料庫裝載完畢。 資料庫已經開啟。 SQL>
--到目前為止,問題解決。
[轉]ORA-01034: ORACLE not available如何解決