ITPub博客

首页 > 应用开发 > IT综合 > How to upgrade the protection mode in Data Guard environment [ID 800212.1]

How to upgrade the protection mode in Data Guard environment [ID 800212.1]

原创 IT综合 作者: 时间:2011-06-24 14:36:54 0 删除 编辑
How to upgrade the protection mode in Data Guard environment [ID 800212.1]

修改时间 26-NOV-2010 类型 HOWTO 状态 MODERATED

In this Document
Goal
Solution
References


Platforms: 1-914CU;

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.2.0.2 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Goal

How to upgrade the protection mode in Data Guard environment

Solution


To change the protection mode from max performance to max availability

Starting from 10.2 onwards protection mode upgrade can be done online as long as the DG_CONFIG attribute of the LOG_ARCHIVE_CONFIG parameter has been configured.

So it does not require primary database downtime like earlier releases.

If you upgrade to MAXPROTECTION mode, then primary database restart is a must

Note:- 11gR2 eliminates this restriction. You can upgrade to maxprotection from maxavailability without primary database restart. Only thing is that you need to first upgrade from maxperformance to maxavailability and then to maxprotection.
If you want to directly upgrade to maxprotection from maxperformance, then it requires primary database restart.

Protection Mode upgrade is always done at primary site.
This document is intended to help those who use either sqlplus or dgmgrl to manage their data guard environment
If you use sqlplus to manage the data guard environment, then you need to issue the sql commands in primary site always.
If you manage Data Guard environment using broker, then connect to any database that is part of the DG configuration and issue the broker commands.
In both cases protection mode upgrade will be reflected to standby automatically.

Example

DGMGRL> show configuration;

Configuration
Name: DRSolution
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
pr_prim - Physical standby database
dr_prim - Primary database

Current status for "DRSolution":
SUCCESS

*** Changing from MaxPerformance to MaxAvailability ***


Note:- This fails becuase, standby is missing standby redo logs. So we will have to have standby redo logs to support this protection mode. So we have to add the standby redo logs at standby when being in mount stage.


DGMGRL> edit database 'pr_prim' set property LogXptMode='SYNC';
Error: ORA-16789: missing standby redo logs

Failed.
DGMGRL> edit database 'pr_prim' set state='LOG-APPLY-OFF';
Succeeded.

Note:- We do this becuase, MaxAvailability protection mode requires lgwr sync affirm redo transport attributes. So we make this change before we actually upgrade the protection mode


DGMGRL> edit database 'pr_prim' set property LogXptMode='SYNC';
Property "logxptmode" updated
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
Succeeded.
DGMGRL> show configuration;

Configuration
Name: DRSolution
Enabled: YES
Protection Mode: MaxAvailability
Fast-Start Failover: DISABLED
Databases:
pr_prim - Physical standby database
dr_prim - Primary database

Current status for "DRSolution":
SUCCESS

<<-- equivalent SQL command excuted in primary --->


Sat Apr 4 09:23:44 2009
ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY
Sat Apr 4 09:23:44 2009
Completed: ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY
Sat Apr 4 09:23:44 2009
ALTER SYSTEM ARCHIVE LOG
Sat Apr 4 09:23:48 2009


Changing from MaxAvailability to MaxProtection

Upgrading to MaxProtection requires primary database restart regardless of current protection mode (being it MaxPerformance or MaxAvailability).

Note:- 11gR2 eliminates this restriction. You can upgrade to maxprotection on the fly as long as you are in max protection.

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
Succeeded.
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXPROTECTION;
Succeeded.

Please note that you should have connected as a valid sysdba user with password (dgmgrl sys/)
If at all you have connected as (dgmgrl /), then this attempt will fail "ORA-01031: insufficient privileges"


DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXPROTECTION;
Operation requires shutdown of instance "stdby" on database "dr_prim"
Shutting down instance "stdby"...
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "stdby" on database "dr_prim"
Starting instance "stdby"...
ORACLE instance started.
Database mounted.
DGMGRL>
DGMGRL> show configuration;

Configuration
Name: DRSolution
Enabled: YES
Protection Mode: MaxProtection
Fast-Start Failover: DISABLED
Databases:
pr_prim - Physical standby database
dr_prim - Primary database

Current status for "DRSolution":
SUCCESS
DGMGRL>

ORA-01031 is because I connected from dgmgrl as connect /
Please note this test was done from 11.1.0.6 setup

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXPROTECTION;
Operation requires shutdown of instance "plus" on database "pr_plus"
Shutting down instance "plus"...
ORA-01031: insufficient privileges

You are no longer connected to ORACLE
Please connect again.
Unable to shut down instance "plus"
You must shut down instance "plus" manually
Operation requires startup of instance "plus" on database "pr_plus"
You must start instance "plus" manually
DGMGRL> conn sys/oracle
Unrecognized command "conn", try "help"
DGMGRL> connect sys/oracle
Connected.
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXPROTECTION;
Operation requires shutdown of instance "plus" on database "pr_plus"
Shutting down instance "plus"...
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "plus" on database "pr_plus"
Starting instance "plus"...
ORACLE instance started.
Database mounted.
Database opened.
DGMGRL>


<<-- equivalent SQL command excuted in primary --->


Completed: alter database mount
Sat Apr 4 09:24:35 2009
Starting Data Guard Broker (DMON)
NSV0 started with pid=15, OS id=27728
INSV started with pid=16, OS id=27731
RSM0 started with pid=18, OS id=27736
Sat Apr 4 09:24:46 2009
ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PROTECTION
Completed: ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PROTECTION
Sat Apr 4 09:24:46 2009


Protection Mode downgrade does not demand primary database outage or restart
You can do it online


DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
Succeeded.
DGMGRL> show configuration;

Configuration
Name: DRSolution
Enabled: YES
Protection Mode: MaxAvailability
Fast-Start Failover: DISABLED
Databases:
pr_prim - Physical standby database
dr_prim - Primary database

Current status for "DRSolution":
SUCCESS

DGMGRL>

<<-- equivalent SQL command excuted in primary --->

Sat Apr 4 09:27:08 2009
ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY
Sat Apr 4 09:27:08 2009
Completed: ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY
Sat Apr 4 09:27:08 2009







References


显示相关信息 相关的


产品
  • Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
关键字
PASSWORD; STANDBY DATABASE; PHYSICAL STANDBY; AVAILABILITY
错误
ORA-16789; ORA-1031; 16789 ERROR
[@more@]

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

请登录后发表评论 登录
全部评论
  • 博文量
    89
  • 访问量
    394818