cool hit counter Oracle11gRAC + Dataguard Primary Backup Switching_Intefrankly

Oracle11gRAC + Dataguard Primary Backup Switching


I. Dataguard primary and secondary switching process (switchover)

Main cut to standby (rac_to_single)

single_to_rac

Generally switchover switches are planned switches, characterized by the fact that after the switchover, no data is lost, and the process is reversible, the entire dataguard environment is not destroyed, and all physical and logical standby in the original Dataguard environment can continue to work.

Before performing a physical standby switchover of Dataguard it is important to note that

1) Confirm that the network connection between the master and slave libraries is open.

2) Confirm that no active sessions are connected in the database.

3) the primart database is in the open state and the standby database is in the mount state ADG.

4) Ensure that the standby database is in archivelog mode.

5) If the redo application delay is set, then remove this setting.

6) Ensure that the initialization parameters for the master and slave libraries are configured so that the dataguard mechanism can run smoothly after the switchover is complete.

2. dataguard primary and secondary switchover process (failover)

A failover switchover is generally a switchover after a failure of the PRIMARY database, and this is the case where the STANDBY database plays its role. It is important to switch the handling of redo in this case. If handled well. There will be no data loss, otherwise there will be data loss. moreover

The process is irreversible and the dataguard environment is destroyed.

Since the primary database cannot be started, there is not much required for a failover switch, just check if the standby is running in maximum protection mode, if so, it needs to be set to maximum performance mode, otherwise the switch to the primary role will not start either.

However, if the primary library has flashback enabled before the failure, then after switching the backup library to the primary, you can also flash the original primary library back to before the failure, before changing it to the backup again, so that a complete set of dg can be formed again.

II. Dataguard primary and secondary switching process (switchover)

1、Check the status of the primary and backup libraries

Note the active session of the primary library, the state of the backup library that can be switched (not alloved,to primary)

select database_role,switchover_status from v$database;

2. shut down the second node on the master library.

srvctl stop instance -d racdb -i racdb2

srvctl stop instance -d racdb -n rac2

3. Check if the backup library is in maximum performance mode

select database_role,switchover_status from v$database;

select * from v$archived_log where applied='NO';

4、Main library operation

Normal switch command

alter database commit to switchover to physical standby;

The main library status is session active

alter database commit to switchover to physical standby with session shutdown;

Boot to mount state

startup mount;

5、Reserve operation

select database_role,switchover_status from v$database;

alter database commit to switchover to primary;

select database_role,switchover_status from v$database;

6. Checking parameters

New main library stand-alone.

alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(standbydb,racdb)' scope=both sid='*';

alter system set LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standbydb' scope=both sid='*';

alter system set LOG_ARCHIVE_DEST_2='SERVICE=racdb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=racdb' scope=both sid='*';

alter system set log_archive_format='%t_%s_%r.arc' scope=spfile sid='*';

alter system set FAL_SERVER='racdb' scope=both sid='*';

alter system set fal_client='standbydb' scope=both sid='*';

New reserve bank rac double

alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(racdb,standbydb)' scope=both sid='*';

alter system set LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=racdb' scope=both sid='*';

alter system set LOG_ARCHIVE_DEST_2='SERVICE=standbydb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standbydb' scope=both sid='*';

alter system set log_archive_format='%t_%s_%r.arc' scope=spfile sid='*';

alter system set fal_client='racdb' scope=both sid='*';

alter system set FAL_SERVER='standbydb' scope=both sid='*';

7、new reserve launchmrp process

launch

alter database recover managed standby database disconnect from session;

8. open new main library

alter database open;

Switching log test

9、 spare room launchADG mode

close

alter database recover managed standby database cancel;

alter database recover managed standby database disconnect from session;

Start rac2

srvctl start instance -d racdb -i racdb2

View db_create_file_dest

show parameter db_create_file_dest

alter system reset db_create_file_dest sid='*';

Restarting the backup library

srvctl stop database -d racdb;

srvctl start database -d racdb;

10. Start real-time synchronization mode

alter database recover managed standby database cancel;

alter database recover managed standby database using current logfile disconnect;

Welcome to "Teach Yourself Oracle"


Recommended>>
1、Data chain synergy will be the new driving force for business development
2、OneVision Goes Live See How Data Guy Makes News
3、Big data turns out to be understood in this way
4、KaiFu Lees English speech the future of artificial intelligence
5、Bookmarked 25 free English literature download sites you should know about

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号