ORA-01093错误解决

环境是RAC+RAC的DG的10.2.0.5环境

当时是把主备库打开,想启动MRP进程(实时应用),但是执行语句时出现1093错误:

 

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




SQL> !oerr ora 1093
01093, 00000, "ALTER DATABASE CLOSE only permitted with no sessions connected"
// *Cause:  There is at least one more session other than the current one
//         logged into the instance.  ALTER DATABASE CLOSE is not permitted.
// *Action: Find the other sessions and log them out and resubmit the command

 

上面说的很清楚:原因是多于一个的会话连接当前数据库实例。ALTER DATABASE CLOSE is not permitted;

 

解决办法是退出该会话;

字面意思没有很懂,当我查看主备库状态时发现备库处于只读状态:

SQL> select open_mode from gv$database;


OPEN_MODE
----------
READ ONLY
READ ONLY

 

哎,粗心误大事啊,启动实时应用备库需要在mount状态下的;

 

解决办法是,把备库启动到mount状态下,再执行:

 

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup  mount;
ORACLE instance started.


Total System Global Area  327155712 bytes
Fixed Size                  1273516 bytes
Variable Size              96469332 bytes
Database Buffers          226492416 bytes
Redo Buffers                2920448 bytes
Database mounted.
SQL> alter database recover managed standby database disconnect from session;


Database altered.

 

 

ok,问题解决,其实就是要注意启用MRP,备库要处于MOUNT状态下进行

(注意:Oracle 10g,要在mount状态下,才能开启MRP。然而11g在open就可以)

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值