ORA-01102: cannot mount database in EXCLUSIVE 处理方法

简介:

今天启动rac数据库一个节点时报错了!

SQL> startup mount

ORACLE instance started.

Total System Global Area 608174080 bytes

Fixed Size 1220844 bytes

Variable Size 176164628 bytes

Database Buffers 427819008 bytes

Redo Buffers 2969600 bytes

ORA-01102: cannot mount database in EXCLUSIVE mode

Google了一下发现一个写的非常好的帖子,详细内如如下(被我修改过了!)

分析原因:

一、在HA系统中,已经有其他节点启动了实例,将双机共享的资源(如磁盘阵列上的裸设备)占用了;

二、说明Oracle被异常关闭时,有资源没有被释放,一般有以下几种可能,

1、 Oracle的共享内存段或信号量没有被释放;

2、 Oracle的后台进程(如SMON、PMON、DBWn等)没有被关闭;

3、 用于锁内存的文件lk<sid>和sgadef<sid>.dbf文件没有被删除。

解决思路:

当发生1102错误时,可以按照以下流程检查、排错:
如果是HA系统,检查其他节点是否已经启动实例检查Oracle进程是否存在,如果存在则杀掉进程检查信号量是否存在,如果存在,则清除信号量检查共享内存段是否存在,如果存在,则清除共享内存段检查锁内存文件lk<sid>和sgadef<sid>.dbf是否存在,如果存在,则删除。

具体做法:

首先,虽然我们的系统是HA系统,但是备节点的实例始终处在关闭状态,这点通过在备节点上查数据库状态可以证实。

其次、是因系统掉电引起数据库宕机的,系统在接电后被重启,因此我们排除了第二种可能种的1、2点。最可疑的就是第3点了。

查$ORACLE_HOME/dbs目录:

$ cd $ORACLE_HOME/dbs

$ ls sgadef*

sgadef* not found

$ ls lk*

/opt/oracle/product/ 10.2.0/db_1/dbs/lkSIMPLY

lkSIMPLY

果然,lk<sid>文件没有被删除。将它删除掉

$ rm lk*

再次启动时又遇到下面的错误,不过别担心,继续后面的操作就搞定

SQL> startup mount

ORACLE instance started.

Total System Global Area 608174080 bytes

Fixed Size 1220844 bytes

Variable Size 176164628 bytes

Database Buffers 427819008 bytes

Redo Buffers 2969600 bytes

ORA-00205: error in identifying control file, check alert log for more info : (

查看共享内存段

[root@simply bdump]# ipcs -map

------ Shared Memory Creator/Last-op --------

shmid owner cpid lpid

786444 root 6490 6438

819213 root 6549 6438

1409040 oracle 31502 16728

根据ID号清楚共享内存段

ipcrm –m 1409040

我这里操作是没有成功的,不过执行了下面的操作就ok了!

查看信号量

[root@simply bdump]# ipcs -s

key semid owner perms nsems

0x17ff6454 360448 oracle 640 154

清除oracle的信号量

[root@simply bdump]# ipcrm -s 360448

再次查询确认

[root@simply bdump]# ipcs -s

------ Semaphore Arrays --------

key semid owner perms nsems

再查询共享内存段也ok了!

[root@simply bdump]# ipcs -m

如果是Oracle进程没有关闭,

$kill -9 <PID>













本文转自xiaocao1314051CTO博客,原文链接: http://blog.51cto.com/xiaocao13140/2072665,如需转载请自行联系原作者

相关文章
|
缓存 Java 数据库连接
MybatisPlusException: Your property named “xxx“ cannot find the corresponding database column name!
MybatisPlusException: Your property named “xxx“ cannot find the corresponding database column name!
249 0
|
SQL Java 关系型数据库
spring boot集成mybatis只剩两个sql 并提示 Cannot obtain primary key information from the database, generated objects may be incomplete
spring boot集成mybatis只剩两个sql 并提示 Cannot obtain primary key information from the database, generated objects may be incomplete
220 0
spring boot集成mybatis只剩两个sql 并提示 Cannot obtain primary key information from the database, generated objects may be incomplete
|
消息中间件 Linux
Linux - error: cannot open Packages database in /var/lib/rpm
Linux - error: cannot open Packages database in /var/lib/rpm
472 0
|
SQL 数据库 Windows
Cannot execute as the database principal because the principal "guest" does not exist, this type of principal cannot be impersonated, or you do not ha
原文:Cannot execute as the database principal because the principal "guest" does not exist, this type of principal cannot be impersonated, or you do not have permission. 今天遇到这样一个问题:一个系统的作业需要给系统Support人员开放SQL Agent下作业的查看、执行权限。
1083 0
|
Java Spring Maven
深入Spring Boot:怎样排查 Cannot determine embedded database driver class for database type NONE
写在前面 这个demo来说明怎么一步步排查一个常见的spring boot AutoConfiguration的错误。 https://github.
3871 0
|
Oracle 关系型数据库 数据库

热门文章

最新文章