我的编程空间,编程开发者的网络收藏夹
学习永远不晚

ORA-01102: cannot mount database in EXCLUSIVE mode

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

ORA-01102: cannot mount database in EXCLUSIVE mode

有台测试环境的数据库,因磁盘爆了,新加了一块硬盘,在启动的时候数据库崩了


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

 


分析原因:

一、在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


 

查看信号量

[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>

再次启动数据库,OK!

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

ORA-01102: cannot mount database in EXCLUSIVE mode

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

ORA-01102: cannot mount database in EXCLUSIVE mode ORACLE 报错 故障修复 远程处理

文档解释ORA-01102: cannot mount database in EXCLUSIVE modeCause: Some other instance has the database mounted exclusive or
ORA-01102: cannot mount database in EXCLUSIVE mode ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-01099: cannot mount database in SHARED mode if started in single process mode ORACLE 报错 故障修复 远程处

文档解释ORA-01099: cannot mount database in SHARED mode if started in single process modeCause: ObviousAction:
ORA-01099: cannot mount database in SHARED mode if started in single process mode ORACLE 报错 故障修复 远程处
2023-11-04

ORA-01183: cannot mount database in SHARED mode ORACLE 报错 故障修复 远程处理

文档解释ORA-01183: cannot mount database in SHARED modeCause: Some other instance has the database mounted
ORA-01183: cannot mount database in SHARED mode ORACLE 报错 故障修复 远程处理
2023-11-04

ORA-10643: Database should be mounted in restricted mode and Exclusive mode ORACLE 报错 故障修复 远程处理

文档解释ORA-10643: Database should be mounted in restricted mode and Exclusive modeCause: When SYSTEM tablespace is being
ORA-10643: Database should be mounted in restricted mode and Exclusive mode ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-12720: operation requires database is in EXCLUSIVE mode ORACLE 报错 故障修复 远程处理

文档解释ORA-12720: operation requires database is in EXCLUSIVE modeCause: This command can only be run when the database is
ORA-12720: operation requires database is in EXCLUSIVE mode ORACLE 报错 故障修复 远程处理
2023-11-04

ORA-12809: cannot set string_INSTANCES when mounted in exclusive mode ORACLE 报错 故障修复 远程处理

文档解释ORA-12809: cannot set string_INSTANCES when mounted in exclusive modeCause: An attempt was made to set
ORA-12809: cannot set string_INSTANCES when mounted in exclusive mode ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-31103: Resource locked in shared mode. Cannot add exclusive lock ORACLE 报错 故障修复 远程处理

文档解释ORA-31103: Resource locked in shared mode. Cannot add exclusive lockCause: The resource is locked in shared mode.
ORA-31103: Resource locked in shared mode. Cannot add exclusive lock ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-31102: Already locked in exclusive mode. Cannot add lock. ORACLE 报错 故障修复 远程处理

文档解释ORA-31102: Already locked in exclusive mode. Cannot add lock.Cause: The resource is already locked in exclusive
ORA-31102: Already locked in exclusive mode. Cannot add lock. ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-15554: cannot start workload replay client because the database server is not in PREPARE mode OR

文档解释ORA-15554: cannot start workload replay client because the database server is not in PREPARE modeCause: The
ORA-15554: cannot start workload replay client because the database server is not in PREPARE mode OR
2023-11-04

ORA-25337: Cannot propagate in queue-to-queue mode to a database with version lower than 10.2 ORACLE

文档解释ORA-25337: Cannot propagate in queue-to-queue mode to a database with version lower than 10.2Cause: Remote
ORA-25337: Cannot propagate in queue-to-queue mode to a database with version lower than 10.2 ORACLE
2023-11-04

ORA-38787: Creating the first guaranteed restore point requires mount mode when flashback database i

文档解释ORA-38787: Creating the first guaranteed restore point requires mount mode when flashback database is off.Cause:
ORA-38787: Creating the first guaranteed restore point requires mount mode when flashback database i
2023-11-05

ORA-23633: Cannot turn off combined capture and apply mode in apply-state checkpoint mode (value 

文档解释ORA-23633: Cannot turn off combined capture and apply mode in apply-state checkpoint mode (value string, string
ORA-23633: Cannot turn off combined capture and apply mode in apply-state checkpoint mode (value 
2023-11-05

ORA-15603: Action cannot be performed when database is in read-only mode. ORACLE 报错 故障修复 远程处理

文档解释ORA-15603: Action cannot be performed when database is in read-only mode.Cause: A procedure in DBMS_AUTO_TASK_ADMIN
ORA-15603: Action cannot be performed when database is in read-only mode. ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-13920: Threshold cannot be set when database is in read-only mode. ORACLE 报错 故障修复 远程处理

文档解释ORA-13920: Threshold cannot be set when database is in read-only mode.Cause: SET_THRESHOLD procedure was called
ORA-13920: Threshold cannot be set when database is in read-only mode. ORACLE 报错 故障修复 远程处理
2023-11-05

ORA-23632: Cannot force checkpoints in apply-state checkpoint mode (value “string”, stri

文档解释ORA-23632: Cannot force checkpoints in apply-state checkpoint mode (value string, string parameter string)Cause:
ORA-23632: Cannot force checkpoints in apply-state checkpoint mode (value “string”, stri
2023-11-04

编程热搜

目录