Sometimes OS team may request for outage on standby database server for maintenance activites. In that we need to stop the log shipping to avoid error in the alert log.

Run below commands to disable and enable the log shipping.

primary db -> prod
standby db - > proddr

1. Login to primary db server

$dgmgrl sys/[email protected]
DGMGRL for Linux: Release 12.2.0.1.0 - Production on Wed Oct 7 14:32:15 2020

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.
Conprodcted to "prod"
Conprodcted as SYSDBA.
DGMGRL> show configuration

Configuration - dg_config_prod

  Protection Mode: MaxPerformance
  Members:
  prod       - Primary database
    proddr     - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 8 seconds ago)

2. Check the apply and transport status:

DGMGRL> show database proddr

Database - proddr

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 0 seconds ago)
  Apply Lag:          0 seconds (computed 0 seconds ago)
  Average Apply Rate: 335.00 KByte/s
  Real Time Query:    ON
  Instance(s):
    proddr

Database Status:
SUCCESS

3. Disable shipping and apply process:

DGMGRL> edit database proddrstby  set state='APPLY-OFF';
Succeeded.
DGMGRL> edit database proddrstby  set state='LOG-TRANSPORT-OFF';


DGMGRL>  show database proddrstby

Database - proddrstby

  Role:               PHYSICAL STANDBY
  Intended State:     TRANSPORT-OFF
  Transport Lag:      0 seconds (computed 1 second ago)
  Apply Lag:          (unknown)
  Average Apply Rate: (unknown)
  Real Time Query:    OFF
  Instance(s):
    proddrstby

Database Status:
SUCCESS


4. Now enable shipping and apply process:

DGMGRL> edit database proddrstby  set state='APPLY-ON';
Succeeded.
DGMGRL> edit database proddrstby  set state='TRANSPORT-ON';


DGMGRL>  show database proddrstby

Database - proddrstby

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 1 second ago)
  Apply Lag:          (unknown)
  Average Apply Rate: (unknown)
  Real Time Query:    ON
  Instance(s):
    proddrstby

Database Status:
SUCCESS

dgmgrlstandby DATAGUARD


Related Topics

How to setup dataguard broker configuration (DG broker) in 12c
How to disable enable log shipping in standby using dgmgrl
Flashback primary database in dataguard environment
How to use expdp to export data from physical standby database
How to add a tempfile in primary database in dataguard
Standby redologs in oracle dataguard
How to recreate physical standby controlfile
Useful DGMGRL commands in oracle dataguard
How to enable active dataguard in physical standby database

You May Also Like

orapwd tool for password file in oracle
SETUP ORACLE 18C DATABASE - STEP BY STEP
Rollback database patch in oracle 12c
ENABLE_PARALLEL_DML hint in oracle 12c
Deinstall Management Agents Oracle 12c cloud control
How to change sysman password for oracle 12c cloud control
SAMPLE parameter in EXPDP to export subset of data
Upgrade grid infrastructure to 19C oracle
Useful DGMGRL commands in oracle dataguard
SET ROWLIMIT in oracle 18C - New feature

From This Website

How to change the case (Lower to Upper and Vice Versa) in R
What is colored sql_id in dba_hist_colored_sql
How to enable active dataguard in physical standby database
Apply database proactive bundle patch in RAC using manual process
Display sql_id of the sql, using set feedback in oracle 18C - New feature
ORA-20101: TABLESPACE is not a ASSM (Automatic Segment Space Management) tablespace
How to drop SQL baselines in oracle
How to stop MySQL on Linux and Windows
OGG-00665 OCI Error describe for query
Standby redologs in oracle dataguard