ORA-01102错误的解决

简介: 背景: 由于业务需要对一个数据的频繁的启停操作,刚开始启停数据库很正常,但是终于出现了错误,数据库启动的时候报错了,通过sqlplus运行startup的时候报ORA-01102的错误,查找了metalink终于找到了相应的解决方法; 解决...

背景:

由于业务需要对一个数据的频繁的启停操作,刚开始启停数据库很正常,但是终于出现了错误,数据库启动的时候报错了,通过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管理 )  

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

相关文章
|
索引 数据库管理 Linux
|
SQL 关系型数据库 Oracle
ORA-00911错误
ORA-00911,"911"看着很霸气的错误号,虽然我还是Oracle的初学者,但每次碰到一个未见过的ORA错误号后,都有一种查案的赶脚,根据错误号、OERR、相关错误信息,判断错误原因以及找到解决方案或替代方案,虽然大部分可能还是参考前辈或官方,但碰到一次后,至少是似曾相识了,再次碰到时即使不记得,大概也能有个方向。
1062 0
|
SQL Oracle 关系型数据库
|
SQL Oracle 关系型数据库
|
SQL Oracle 关系型数据库
|
关系型数据库 Oracle Linux
|
SQL 关系型数据库 Oracle