oracle reinstate,12c ADG reinstate database xxx

这篇博客详细记录了一次在Oracle 12CADG环境中进行的主备数据库切换和恢复的操作过程。在遇到主库存储异常时,通过DGMGRL工具成功将角色切换到备库,并在主库修复后恢复了原有的主备关系。整个操作涉及验证数据库状态、执行故障转移和重新启用备库等步骤。
摘要由CSDN通过智能技术生成

测试演练一下12C ADG环境,可能因为某些极端情况,比如主库存储异常,只能切换到备库。然后主库存储修复,重新恢复主备。

详见如下操作;

在新主库上操作

$dgmgrl /

DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.

Connected as SYSDG.

DGMGRL>

DGMGRL> show configuration;

Configuration - dg_config

Protection Mode: MaxPerformance

Members:

orcldg - Primary database

orcl - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS (status updated 34 seconds ago)

DGMGRL> validate database orcldg;

Database Role: Primary database

Ready for Switchover: Yes

DGMGRL> validate database orcl;

Database Role: Physical standby database

Primary Database: orcldg

Ready for Switchover: Yes

Ready for Failover: Yes (Primary Running)

DGMGRL> failover to orcl;

Performing failover NOW, please wait...

Failover succeeded, new primary is "orcl"

DGMGRL> show configuration;

Configuration - dg_config

Protection Mode: MaxPerformance

Members:

orcl - Primary database

orcldg - Physical standby database (disabled)

ORA-16661: the standby database needs to be reinstated

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS (status updated 71 seconds ago)

##保证原主库为mount状态

DGMGRL> reinstate database orcldg;

Reinstating database "orcldg", please wait...

Reinstatement of database "orcldg" succeeded

DGMGRL> show configuration;

Configuration - dg_config

Protection Mode: MaxPerformance

Members:

orcl - Primary database

orcldg - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS (status updated 6 seconds ago)

DGMGRL> validate database orcl;

Database Role: Primary database

Ready for Switchover: Yes

DGMGRL> validate database orcldg;

Database Role: Physical standby database

Primary Database: orcl

Ready for Switchover: Yes

Ready for Failover: Yes (Primary Running)

DGMGRL>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值