ITPub博客

首页 > 数据库 > Oracle > 【ORA-01154】database busy.Open,close,mount and dismount not allowed now

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

原创 Oracle 作者:GM_DBA 时间:2014-09-05 09:23:18 4 删除 编辑
故障描述
     使用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博客 ” ,链接:https://blog.itpub.net/29319205/viewspace-1264460/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-11-20

  • 博文量
    33
  • 访问量
    207646