如何使用DGBroker关闭redo应用(1)
admin
2023-04-25 00:40:06
0


A LITTLE EFFORT EVERY DAY.YOU WILL MAKE A BIG DIFFERENCE.


如何使用DGBroker关闭redo应用


一、描述

Oracle 12c

rhel 7


二、实验

1.查看配置

DGMGRL> show configuration;


Configuration - dg_config


  Protection Mode: MaxAvailability

  Members:

  orcl   - Primary database

    orcldg - Physical standby database 


Fast-Start Failover: DISABLED


Configuration Status:

SUCCESS   (status updated 27 seconds ago)


DGMGRL> 


2.查看数据库信息

DGMGRL> show database verbose orcl;


Database - orcl


  Role:               PRIMARY

  Intended State:     TRANSPORT-ON    --启用传输

  Instance(s):

    orcl


  Properties:

    DGConnectIdentifier             = 'orcl'

    ObserverConnectIdentifier       = ''

    LogXptMode                      = 'sync'

    RedoRoutes                      = ''

    DelayMins                       = '0'

    Binding                         = 'optional'

    MaxFailure                      = '0'

    MaxConnections                  = '1'

    ReopenSecs                      = '300'

    NetTimeout                      = '10'

    RedoCompression                 = 'DISABLE'

    LogShipping                     = 'ON'

    PreferredApplyInstance          = ''

    ApplyInstanceTimeout            = '0'

    ApplyLagThreshold               = '0'

    TransportLagThreshold           = '0'

    TransportDisconnectedThreshold  = '30'

    ApplyParallel                   = 'AUTO'

    StandbyFileManagement           = 'AUTO'

    ArchiveLagTarget                = '0'

    LogArchiveMaxProcesses          = '4'

    LogArchiveMinSucceedDest        = '1'

    DbFileNameConvert               = ''

    LogFileNameConvert              = ''

    FastStartFailoverTarget         = ''

    InconsistentProperties          = '(monitor)'

    InconsistentLogXptProps         = '(monitor)'

    SendQEntries                    = '(monitor)'

    LogXptStatus                    = '(monitor)'

    RecvQEntries                    = '(monitor)'

    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=roidb01)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl_DGMGRL)(INSTANCE_NAME=orcl)(SERVER=DEDICATED)))'

    StandbyArchiveLocation          = '+DATADG/arch'

    AlternateLocation               = ''

    LogArchiveTrace                 = '0'

    LogArchiveFormat                = 'log_%t_%s_%r_%d.arc'

    TopWaitEvents                   = '(monitor)'


Database Status:

SUCCESS


DGMGRL> show database verbose orcldg;


Database - orcldg


  Role:               PHYSICAL STANDBY

  Intended State:     APPLY-ON   --应用启用

  Transport Lag:      0 seconds (computed 1 second ago)

  Apply Lag:          0 seconds (computed 1 second ago)

  Average Apply Rate: 0 Byte/s

  Active Apply Rate:  0 Byte/s

  Maximum Apply Rate: 0 Byte/s

  Real Time Query:    ON

  Instance(s):

    orcldg


  Properties:

    DGConnectIdentifier             = 'orcldg'

    ObserverConnectIdentifier       = ''

    LogXptMode                      = 'sync'

    RedoRoutes                      = ''

    DelayMins                       = '0'

    Binding                         = 'optional'

    MaxFailure                      = '0'

    MaxConnections                  = '1'

    ReopenSecs                      = '300'

    NetTimeout                      = '10'

    RedoCompression                 = 'DISABLE'

    LogShipping                     = 'ON'

    PreferredApplyInstance          = ''

    ApplyInstanceTimeout            = '0'

    ApplyLagThreshold               = '0'

    TransportLagThreshold           = '0'

    TransportDisconnectedThreshold  = '30'

    ApplyParallel                   = 'AUTO'

    StandbyFileManagement           = 'AUTO'

    ArchiveLagTarget                = '0'

    LogArchiveMaxProcesses          = '4'

    LogArchiveMinSucceedDest        = '1'

    DbFileNameConvert               = ''

    LogFileNameConvert              = ''

    FastStartFailoverTarget         = ''

    InconsistentProperties          = '(monitor)'

    InconsistentLogXptProps         = '(monitor)'

    SendQEntries                    = '(monitor)'

    LogXptStatus                    = '(monitor)'

    RecvQEntries                    = '(monitor)'

    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=roidb02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcldg_DGMGRL)(INSTANCE_NAME=orcldg)(SERVER=DEDICATED)))'

    StandbyArchiveLocation          = '+DATADG/arch'

    AlternateLocation               = ''

    LogArchiveTrace                 = '0'

    LogArchiveFormat                = 'log_%t_%s_%r_%d.arc'

    TopWaitEvents                   = '(monitor)'


Database Status:

SUCCESS


DGMGRL> edit database 'orcldg' set state='apply-off';

Succeeded.

DGMGRL> 


SQL> select process,status from v$managed_standby;


PROCESS   STATUS

--------- ------------

ARCH      CLOSING

ARCH      CLOSING

ARCH      CONNECTED

ARCH      CLOSING

RFS       IDLE

RFS       IDLE

RFS       IDLE

RFS       IDLE


8 rows selected.


DGMGRL> edit database 'orcldg' set state='apply-on';   

Succeeded.

DGMGRL> 


SQL> /


PROCESS   STATUS

--------- ------------

ARCH      CLOSING

ARCH      CLOSING

ARCH      CONNECTED

ARCH      CLOSING

RFS       IDLE

RFS       IDLE

RFS       IDLE

RFS       IDLE

MRP0      APPLYING_LOG


9 rows selected.


三、知识点

1.使用DGBroker启停redo apply 

2.物理standby 数据库状态

3.MRP0进程作用


官网解释如下:


Physical standby


APPLY-ON

Redo Apply is started on a physical standby database.  --启动redo应用

If the standby database is an Oracle RAC database, the broker starts Redo Apply on exactly one standby instance, 

called the apply instance. If this instance fails, the broker automatically chooses another instance that is either 

mounted or open read-only. This new instance then becomes the apply instance.

This is the default state for a physical standby database when it is enabled for the first time.

If a license for the Oracle Active Data Guard option has been purchased, a physical standby database

can be open while Redo Apply is active. This capability is known as real-time query. 

See Oracle Data Guard Concepts and Administration for more details.


Physical standby


APPLY-OFF

Redo Apply is stopped.  --关闭redo应用

If this is an Oracle RAC database, there is no instance running Apply Services until you change the database state to APPLY-ON.


相关内容

热门资讯

烈焰熊熊,堪比“原子弹”,欧洲... 据美国有线电视新闻网(CNN)7月29日报道,席卷法国西南部的大片野火燃烧得如此猛烈,以至于形成了一...
外交部:对日本熊本县地震遇难者... 据凤凰卫视报道,针对日本熊本县发生强震造成人员伤亡,中国外交部发言人毛宁7月29日在例行记者会上表示...
高铁喧哗被劝阻后叫嚣全家体制内... “女子高铁喧哗被劝阻后叫嚣全家体制内”一事迎来官方通报。据新京报报道,7月29日,辽宁北票市公安局发...
广东专业蓝牙耳机定制厂家推荐,... 在珠三角腹地,广东早已成为全球蓝牙耳机产业链的“心脏地带”。从深圳华强北的声学元件批发,到东莞、惠州...
格雷厄姆葬礼变地缘竞价场!两大... 有些葬礼,送别的是逝者;有些葬礼,演的却是活人最现实的政治博弈。当地时间7月28日,美国老牌鹰派参议...
一道小学数学题难住3名医学博士... 3名不同学校的博士同做一道数学题,谁最厉害?近日,一陕西网友发布的视频引发热议。29日,视频发布者“...
华为全新“小艺任务”亮相:整合... 7月29日,在华为鸿蒙电脑新品技术沟通会上,终端云服务小艺业务部总裁贾永利宣布,小艺将迎来“从对话到...
广西日报特稿《王的猜想》火了,... 澎湃新闻记者 蒋子文 实习生 汤煜炜为应对外界购买纸质版特稿《王的猜想》的热情,《广西日报》宣布紧急...
月租20元内!2026年平价云... 不少手游玩家、账号运营从业者挑选云手机时,首要诉求就是低价够用,想要控制每月支出在20元以内,同时兼...
诺奖得主如何看待王虹境遇?“我... 中村修二(2014年诺贝尔物理学奖得主)【导读】近日王虹与邓煜双双获得2026年菲尔兹奖,成为了首批...