【ORA-01154】database busy.Open,close,mount and dismount not allowed now

故障描述
     使用DGbroker从备库切换到主库后 ,使用sql语句将备库(standby database)置为read only模式时出现ora-01154错误。
DGMGRL> switchover to prod
Performing switchover NOW, please wait...
Operation requires shutdown of instance "SBDB" on database "sbdb"
Shutting down instance "SBDB"...
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
Operation requires shutdown of instance "PROD" on database "prod"
Shutting down instance "PROD"...
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "SBDB" on database "sbdb"
Starting instance "SBDB"...
ORACLE instance started.
Database mounted.
Operation requires startup of instance "PROD" on database "prod"
Starting instance "PROD"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "prod"
DGMGRL> exit


SYS@SBDB> /
alter database open read only
*
ERROR at line 1:
ORA-01154: database busy. Open, close, mount, and dismount not allowed now

解决办法
      通过broker进行切换

DGMGRL> EDIT DATABASE SBDB set state='read-only';
Succeeded. 
SYS@SBDB> select database_role from v$database;


DATABASE_ROLE
----------------
PHYSICAL STANDBY


SYS@SBDB> select open_mode from v$database;


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

故障解决


小结:在命令行进行操作时,如果无法打开到read only模式时,可尝试使用broker工具进行操作,简单快捷。

2014-9-4 
ocm第8场景训练时

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29319205/viewspace-1264460/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29319205/viewspace-1264460/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值