ORA-01102錯誤的解決

wzq609發表於2014-06-09

背景:

由於業務需要對一個資料的頻繁的啟停操作,剛開始啟停資料庫很正常,但是終於出現了錯誤,資料庫啟動的時候報錯了,透過sqlplus執行startup的時候報ORA-01102的錯誤,查詢了metalink終於找到了相應的解決方法;

 

解決步驟:

A database is started in EXCLUSIVE mode by default. Therefore, the ORA-01102 error is misleading and may have occurred due to one of the following reasons:

 - there is still an "sgadef.dbf" file in the "ORACLE_HOME/dbs" directory

 - the processes for Oracle (pmon, smon, lgwr and dbwr) still exist

 - shared memory segments and semaphores still exist even though the database has been shutdown

 - there is a "ORACLE_HOME/dbs/lk" file

ORACLE_HOME/dbs/sgadef.dbf 檔案,用於監控資料庫的程式;

ORACLE_HOME/dbs/lk檔案,跟oracle在作業系統的共享記憶體段有關係;

 

Solution Description:

=====================

Verify that the database was shutdown cleanly by doing the following:

1. Verify that there is not a "sgadef.dbf" file in the directory

 "ORACLE_HOME/dbs".

 % ls $ORACLE_HOME/dbs/sgadef.dbf

 If this file does exist, remove it.

 % rm $ORACLE_HOME/dbs/sgadef.dbf

2. Verify that there are no background processes owned by "oracle"

 % ps -ef | grep ora_ | grep $ORACLE_SID  (ps -ef | grep ora_ | grep id2)

 If background processes exist, remove them by using the Unix

 command "kill". For example:

 % kill -9

3. Verify that no shared memory segments and semaphores that are owned

 by "oracle" still exist

 % ipcs -a

 If there are shared memory segments and semaphores owned by "oracle",

 remove the shared memory segments

 % ipcrm -m

 and remove the semaphores

 % ipcrm -s

NOTE: The example shown above assumes that you only have one

 database on this machine. If you have more than one

 database, you will need to shutdown all other databases

 before proceeding with Step 4.

4. Verify that the "$ORACLE_HOME/dbs/lk" file does not exist

 if exit,remove it use 'rm' command.

5. Startup the instance

 

總結: 1、刪除相應的檔案;

2、刪除ORACLE程式;

3、刪除ORACLE使用者下的程式,並刪除;

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

本文作者:JOHN

ORACLE技術部落格:ORACLE 獵人筆記               資料庫技術群:367875324 (請備註ORACLE管理 )  

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12679300/viewspace-1179036/,如需轉載,請註明出處,否則將追究法律責任。

相關文章