数据库打开mount模式报错:ORA-01102: cannot mount database in EXCLUSIVE mode
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 2932632 bytes
Variable Size 427819112 bytes
Database Buffers 629145600 bytes
Redo Buffers 13844480 bytes
SQL> SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-01102: cannot mount database in EXCLUSIVE mode
原因:“ORACLE_HOME/dbs” 目录中有一个“sgadef.dbf”文件 , Oracle 的进程(pmon、smon、 lgwr 和 dbwr) 仍然存在 - 即使 数据库已关闭,共享内存段和信号量仍然存在 - 有一个“ORACLE_HOME/dbs/lk”文件 “lk”和“sgadef。 dbf”文件用于锁定共享内存。 似乎即使没有分配内存,Oracle 也认为内存是仍然锁定。
查看启动日志:
解决方法:
1.进入/d01/oracle/PROD/db/tech_st/12.1.0/dbs/目录
2.删除lkPOD文件
rm -rf lkPROD
3.确认Oracle没有后台进程: ps -ef |grep ora_ |grep PROD|grep ora_dbw0_PROD
如果存在后台进程,请使用 命令“kill”将其删除。
[oracle@ebs ~]$ kill -9 1912
重新使用mount模式进行登录
[oracle@ebs ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Mar 2 12:52:42 2022
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 2932632 bytes
Variable Size 427819112 bytes
Database Buffers 629145600 bytes
Redo Buffers 13844480 bytes
Database mounted.
成功解决。