ITPub博客

首页 > 数据库 > Oracle > ORA-01102错误的解决

ORA-01102错误的解决

原创 Oracle 作者:wzq609 时间:2014-06-09 17:42:09 0 删除 编辑

背景:

由于业务需要对一个数据的频繁的启停操作,刚开始启停数据库很正常,但是终于出现了错误,数据库启动的时候报错了,通过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博客 ” ,链接:https://blog.itpub.net/12679300/viewspace-1179036/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-06-16

  • 博文量
    173
  • 访问量
    3083836