重庆思庄Oracle、Redhat认证学习论坛

标题: oracle启动时,提示ORA-01102: cannot mount database in EXCLUSIVE mode的处理 [打印本页]

作者: 王亮    时间: 2020-7-26 19:17
标题: oracle启动时,提示ORA-01102: cannot mount database in EXCLUSIVE mode的处理
操作系统:rhel 7.4 64位
数据库版本:11.2.0.4 64位

现象:在启动数据库,出现ORA-01102: cannot mount database in EXCLUSIVE mode,如下:
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Jul 20 14:39:32 2020
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area 1235959808 bytes
Fixed Size                  2252784 bytes
Variable Size             788529168 bytes
Database Buffers          436207616 bytes
Redo Buffers                8970240 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode


没有多余的提示,那再开一个终端窗口,tail -f 查看数据库alert日志
在later日志中发现如下内容:
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = /u01/app/
Mon Jul 20 14:46:04 2020
ALTER DATABASE   MOUNT
sculkget: failed to lock /u01/app//product/11.2.0/db_1/dbs/lkORCL exclusive
sculkget: lock held by PID: 2067
ORA-09968: unable to lock file
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 16503
ORA-1102 signalled during: ALTER DATABASE   MOUNT...

意思大约为/u01/app//product/11.2.0/db_1/dbs/lkORCL 文件被占用,无法锁定

解决思路,那应该是PID=2067的进程,占用了这个文件,进服务器是重启过的,那查询出是哪个进程,然后kil掉那个进程后再启动试试
首先先将数据库shutdown
解决办法:

SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down。
SQL>


查看进程
[oracle@localhost ~]$ ps -ef |grep ora_



从查出来的进程中,找到alert日志对应PID的进程
[oracle@localhost ~]$ kill -9 PID


kill掉进程后,再启动数据库,可以正常启用。然后查看数据库的状态是否是读写状态。





欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2