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/manager@prod
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 enable active dataguard in physical standby database
How to setup dataguard broker configuration (DG broker) in 12c
How to add a tempfile in primary database in dataguard
How to disable enable log shipping in standby using dgmgrl
Standby redologs in oracle dataguard
How to recreate physical standby controlfile
Flashback primary database in dataguard environment
How to use expdp to export data from physical standby database
Useful DGMGRL commands in oracle dataguard

You May Also Like

Script to get cpu usage and wait event information in oracle database
How to monitor parallel queries in oracle db
Display sql_id of the sql, using set feedback in oracle 18C - New feature
Multinode Hadoop installation steps
Apply database proactive bundle patch in RAC using manual process
How to move controlfile to a new location in oracle
How to use oratop tool for oracle database monitoring
How to get the execution plan for a SQL between two AWR snapshots
COLS & COLSEXCEPT FILTER in goldengate
Hive installation with mysql database

From This Website

Shell script to report failed login attempt in oracle
Open wallet automatically after starting the database
Lock account automatically with INACTIVE_ACCOUNT_TIME
How to recreate MGMT database in ORACLE 12C GRID
MySQL Replication and its Types
DBMS_PARALLEL_EXECUTE in oracle PL/SQL
Setting up Table replication in oracle goldengate
Steps for changing public hostname for a standalone grid infrastructure
Shell script to monitor asm diskgroup usage
Useful DGMGRL commands in oracle dataguard