Oracle 缺失INITORCL及Oracle啟動過程

來源:互聯網
上載者:User

現象
 
C:\Users\陳>sqlplus "/as sysdba"
 
SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 10 13:31:28 2012
 
Copyright (c) 1982, 2010, Oracle. All rights reserved.
 
Connected to:
 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 -Production
 
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> shutdown immediate
 
Database closed.
 
Database dismounted.
 
ORACLE instance shut down.
 
SQL> startup nomount
 
ORA-01078: failure in processing system parameters
 
LRM-00109: could not open parameter file 'E:\APP\CSWGGOD\PRODUCT\11.2.0\DBHOME_1
 
\DATABASE\INITORCL.ORA'
 
原因:缺失INITORCL.ORA
 
解決方案:
 
1.複製INITORCL.ORA檔案
 
C:\Users\陳>E:
 
--------複製INITORCL.ORA備份檔案
 
E:\app\cswggod\product\11.2.0\dbhome_1\database>copy E:\app\cswggod\admin\orcl\p
 
file\init.ora.7182012101127 INITORCL.ORA
 
已複製1 個檔案。
 
E:\app\cswggod\product\11.2.0\dbhome_1\database>dir
 
磁碟機E 中的卷是Workware
 
卷的序號是027B-A992
 
E:\app\cswggod\product\11.2.0\dbhome_1\database 的目錄
 
2012/10/10 13:34 <DIR> .
 
2012/10/10 13:34 <DIR> ..
 
2012/08/18 10:02 <DIR> archive
 
2012/08/18 10:04 2,048 hc_orcl.dat
 
2012/10/08 15:51 1,973 INITORCL.ORA
 
2.啟動資料庫
 
C: \Users\陳>sqlplus "/as sysdba"
 
SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 10 13:31:28 2012
 
Copyright (c) 1982, 2010, Oracle. All rights reserved.
 
Connected to:
 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
 
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> startup nomount
 
ORACLE instance started.
 
Total System Global Area 1071333376 bytes Fixed Size 1375792 bytes Variable Size 528482768 bytes Database Buffers 536870912 bytes Redo Buffers 4603904 bytes SQL> shutdown immediate
 
ORA-01507: database not mounted
 
ORACLE instance shut down. SQL>
 
SQL> startup
 
ORACLE instance started.
 
Total System Global Area 1071333376 bytes Fixed Size 1375792 bytes Variable Size 528482768 bytes Database Buffers 536870912 bytes Redo Buffers 4603904 bytes Database mounted.
 
Database opened.
 
 
 
3.附錄-資料庫啟動過程
 
1)NOMOUNT
 
這一步只和參數檔案有關,如果在這一步就出現問題,那麼通常可能是系統配置(如核心參 數等)存在問題,需要檢查是否分配了足夠的系統資源。
 
2)MOUNT
 
這一步需要從參數檔案中獲得控制檔案位置,讀取其中內容,校正資料檔案的存在性。除此之外還會去校正口令檔案。Oracle 預設尋找 orapw<ORACLE_SID>檔案,如果該檔案找不 到,則繼續尋找 orapw 檔案,如果兩者都不存在,資料庫將出現錯誤。但資料為仍可以打 開。從 Oracle10g 開始,當口令檔案丟失後,Oracle 將不再提示錯誤,只是和口令檔案相關 的部分功能將無法使用。
 
--------------------------------------------<ORACLE_SID>檔案及作用---------------------------------------
 
該檔案在資料庫啟動時建立,用於作業系統對資料庫的鎖定。當資料庫啟動時獲得鎖定,數 據庫關閉時釋放。在系統出現異常時,可能資料庫已經關閉,但鎖定並未釋放,或者因為後 台進程未正常停止等原因,會導致下次資料庫無法啟動。解決辦法就是重啟伺服器,或者手工釋放共用記憶體段。
 
3)OPEN
 
這一步將進行檢查點和完整性的檢查。如果檢查全部通過,則開啟資料庫,否則給出錯誤警 告,停止開啟資料庫。
 
-------------------------------------------------------資料庫的啟動驗證--------------------------------------
 
○1 . 第一次檢查資料檔案頭中的 Checkpoint CNT 是否與對應控制檔案中的 Checkpoint CNT
 
一致。此步驟檢查用以確認資料檔案是否來自同一版本,而不是從備份中恢複而來
 
(在熱備份模式下,資料檔案檢查點被凍結,但檢查點計數不會被凍結,會一直修改) 在 Oracle10g 中用 8 級轉儲獲得控制檔案資訊。
 
SQL> alter session set events 'immediate trace name controlf level 8';
 
在 Oracle9i 中用 10 級轉儲。
 
----------------------------------------------------------------------------------------------------------------------------
 
○2 . 第二次檢查資料檔案頭的開始 SCN 和控制檔案中記錄的該檔案的的結束 SCN 是否一致。如果一致,則不需要對那個檔案進行恢複。
 
部分控制檔案轉儲內容:
 
222 DATA FILE RECORDS
 
223 ***************************************************************************
 
224 (size = 428, compat size = 428, section max = 100, section in-use = 5,
 
225 last-recid= 8, old-recno = 0, last-recno = 0)
 
226 (extent = 1, blkno = 11, numrecs = 100)
 
227 DATA FILE #1:
 
228 (name #7) /u01/app/oracle/oradata/orcl/system01.dbf
 
229 creation size=0 block size=8192 status=0xe head=7 tail=7 dup=1
 
230 tablespace 0, index=1 krfil=1 prev_file=0
 
231 unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
 
232 Checkpoint cnt:52 scn: 0x0000.0007ba16 02/18/2011 16:30:22
 
233 Stop scn: 0xffff.ffffffff 02/16/2011 11:07:26
 
234 Creation Checkpointed at scn: 0x0000.00000009 06/30/2005 19:10:11
 
235 thread:0 rba:(0x0.0.0)
 
236 enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
 
----------------------------------------------------------------------------------------------------------------------------
 
在資料庫出現問題時,提示中給出的可能是不完整的資訊,而警示日誌中則記錄了完整的錯 誤過程和錯誤號碼。
 
說明:
 
控制檔案中記錄的 SCN 指最後一次成功完成的檢查點 SCN; 資料檔案頭中的記錄的 SCN 指資料檔案最後一次成功完成的檢查點 SCN;
 
此外,在控制檔案和資料檔案頭都記錄一個檢查點計數(chkpt cnt),而且資料檔案頭還記錄了一個 控制檔案檢查點計數(ctl cnt)。但這個 ctl cnt 要比控制檔案中的 ctl cnt 小 1。這是因為,當檢查
 
點更新控制檔案和資料檔案頭上的 chkpt cnt 資訊時,在更新控制檔案之前,可以
 
獲得當前的 ctl cnt
 
,這個資訊被記入了資料檔案。之所以這麼做,是因為不能保證更新控制檔案上的 chkpt cnt 一定 會成功,記錄之前的 ctl cnt 可以確保上一次的 chkpt cnt 是成功 完成的。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.