如何使用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.


相关内容

热门资讯

如何从“一证在手”走向“一技傍... 教员在给学员讲解理论知识。 学员在进行无人机试飞训...
内蒙古自治区党委金融工作委员会... 内蒙古自治区党委金融工作委员会副书记马保国涉嫌严重违纪违法,目前正接受内蒙古自治区纪委监委纪律审查和...
涉非市场化发债,老牌房企花样年... 【大河财立方消息】 5月12日,深圳证监局发布行政监管措施决定书显示,花样年集团(中国)有限公司因非...
郑州市今年计划新入库45个城市... 【大河财立方消息】5月12日,郑州市城乡建设局就《郑州市2026年度城市更新计划(征求意见稿)》公开...
让无名者有名,让英雄回家!湖南... 1948年秋冬,辽沈战役的硝烟刚刚散去,一大批东北子弟兵随军南下。不到一年后,1949年8月,300...
伊方透露新一轮谈判先决条件 当地时间12日,伊朗方面发布消息称,一名知情人士透露了伊朗同美国新一轮谈判的五项先决条件 ——即“结...
中东危机下,莫迪将密集访问5国 【环球时报驻巴基斯坦特约记者 黄晓娜】印度外交部11日宣布,印度总理莫迪将于15日开始对阿联酋、荷兰...
“台独”顽固分子沈伯洋参选台北... 【环球时报特约记者 陈立非】台湾今年年底举行“九合一”选举,国民党很早就确定由现任台北市市长蒋万安争...
伊拉克和巴基斯坦据称已分别同伊... 总台记者当地时间5月12日获悉,伊拉克和巴基斯坦已分别同伊朗签订协议,以从海湾地区运输石油和液化天然...