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管理 )  

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

相关文章
|
Oracle 关系型数据库
ORA-00060错误
今天有个同事说生产机有个PERL脚本老是报死锁的错误,脚本里面开启了并行度:错误如下: Failure: ORA-12801: error signaled in parallel query server P126, instance NMS_ODS_NDB1:wgods1 (1)ORA-000...
1279 0
|
SQL 关系型数据库 Oracle
ORA-00911错误
ORA-00911,"911"看着很霸气的错误号,虽然我还是Oracle的初学者,但每次碰到一个未见过的ORA错误号后,都有一种查案的赶脚,根据错误号、OERR、相关错误信息,判断错误原因以及找到解决方案或替代方案,虽然大部分可能还是参考前辈或官方,但碰到一次后,至少是似曾相识了,再次碰到时即使不记得,大概也能有个方向。
1062 0
|
Oracle 网络协议 关系型数据库
|
SQL 关系型数据库 Oracle
|
SQL Oracle 关系型数据库
|
XML 数据库 数据格式
|
索引 数据库管理
|
SQL 缓存 Oracle
ORA-04031错误
ORA-04031错误 ORA-4031 错误故障排除与诊断[视频] (文档 ID 2016002.1)、Troubleshooting and Diagnosing ORA-4031 Error [Video] (文档 ID 396940.
2766 0