ORA-1093 signalled during

本文介绍了在进行数据库主备切换时遇到ORA-01093错误的原因及解决方法,给出了查询活动会话的SQL语句,并提供了两种可行的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在进行主备库切换的时候alter里面出现了这个错误;

SQL>  alter database commit to switchover to physical standby;
 alter database commit to switchover to physical standby
*
ERROR at line 1:
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected

此时日志报错:
Active process 2382 user 'oracle' program 'oracle@oracle11g-std (TNS V1-V3)'
System State dumped to trace file /home/oracle/app/diag/rdbms/ora11standby/ora11/trace/ora11_ora_1908.trc
Errors in file /home/oracle/app/diag/rdbms/ora11standby/ora11/trace/ora11_ora_1908.trc:
Non critical error ORA-48113 caught while writing to trace file "/home/oracle/app/diag/rdbms/ora11standby/ora11/trace/ora11_ora_1908.trc"
Error message: 
Writing to the above trace file is disabled for now on...
CLOSE: Active sessions prevent database close operation
ORA-1093 signalled during:  alter database commit to switchover to physical standby...
知道是有活动回话还连接到数据库上

而且日志中已经说明是那个回话了
也可以使用一下的语句查询出来
SELECT SID, PROCESS, PROGRAM FROM V$SESSION   
 WHERE TYPE = 'USER'
AND SID <> (SELECT DISTINCT SID FROM V$MYSTAT);


解决办法就是:
关闭回话,或者是在alter后面加上with session shutdown

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值