Disclaimer

Sunday, 23 November 2025

Oracle database patching - Windows Database Apr2025 Bundle Patch 19.27.0.0.250415

 
Description:-

Step by Step Applying PSU Patch in Oracle 19c in Windows Environment

Prerequisites to Apply Patch:-Database Release Update 19.27.0.0.250415

1.Shutdown Database Services and Listener
2.Upgrade OPatch Tool
3.Apply PSU patch on ORACLE_HOME in Windows Environment (p37486199_190000_MSWIN-x86-64)
4.Execute Post installation Scripts (datapatch)
5.Check invalid objects 





Patches Details:-

Install Oracle 19c Windows patch
This section includes the following patches:

Patch p37532350 - Windows Database Apr2025 Bundle Patch 19.27.0.0.250415

p6880880_190000_MSWIN-x86-64.zip - (OPatch Utlity)
p37532350_190000_MSWIN-x86-64.zip - (Database Bundle Patch)
p37499406_190000_MSWIN-x86-64.zip (OJVM Patch)
p37542054_190000_MSWIN-x86-64.zip (JDK Bundle Patch)


Note:

Verify that the Oracle OPatch utility version is latest.

We include 4 files and the following are the steps to install and verify the patches which needs to be executed in the order they are specified.

  1. Download the patch files and follow the pre-install setup.

  2. Upgrade OPatch.

  3. Install the patches.

  4. Verify the database and OJVM patch.

  5. Verify the JDK version updates.












OJVM Patch download:- 37499406





JDK Bundle Patch download:- 37542054











Download the Opatch utility version:-




VIMP:-







Note:-


Pre-install setup

1. Make a note of the latest Oracle OJVM patch installed from the System Health Check report in the section Oracle Patch History.
Note:

If you have applied any of the OJVM patches before, then you will have to roll back the previous OJVM patch. Example the last applied OJVM patch was p37499406_190000_MSWIN-x86-64.zip , then it needs to be rolled back and the instruction to rollback is provided later under section Installing the Oracle patches step -7. If no prior OJVM patch found or if it is not 35648110 patch, then no rollback is needed.

2. Log in to the virtual machine or Server where NetBackup IT Analytics is installed.

3. Download the following files from the product download area of the website and save to C:\temp folder.

p6880880_190000_MSWIN-x86-64.zip - (OPatch Utlity)
p37532350_190000_MSWIN-x86-64.zip - (Database Bundle Patch)
p37499406_190000_MSWIN-x86-64.zip (OJVM Patch)
p37542054_190000_MSWIN-x86-64.zip (JDK Bundle Patch)



4. Access the command prompt as an Administrator.

5. Verify %ORACLE_HOME%\perl\bin is displayed in your PATH setting.
Note:

If not displayed in your PATH setting, enter the following:

set PATH=%ORACLE_HOME%\perl\bin;%PATH%
Set the Perl library path to empty.
set perl5lib=


OPatch installation

1. Change directory to the Oracle home directory.

2. Execute command cd C:\opt\oracle.

3. Rename the existing OPatch directory using the following command.
rename Opatch Opatch_old

4. Unzip the file p6880880_190000_MSWIN-x86-64.zip in C:\opt\oracle.

5. Execute the following command to verify the opatch version.
C:\opt\oracle\OPatch>opatch version.

OPatch Version: 12.2.0.1.45




Installing the patches




    1.Stop the Listener and Shutdown Database Services 


    listener stop







    Database Stop:-

    SQL> shut immediate;




    2.  Stop - Distributed Transaction Coordinator service

    c:\> sc query msdtc

    sc query msdtc is a Windows command used to check the status of a Windows service named MSDTC (Microsoft Distributed Transaction Coordinator).




    What this command does

    • sc → Service Controller utility

    • query → Asks for the current status of a service

    • msdtc → The name of the service (Microsoft Distributed Transaction Coordinator)












    Note:- As we have stopped the DB so disable the Database services from Windows Service like below





    Note:

    Verify that all the NetBackup IT Analytics services are stopped by checking in services. If services are still running, the patch installation will not be successful and will cause issues.


    Explicitly stop the Distributed Transaction Coordinator service (which is not an Oracle service) if it is running using the following command.
    net stop msdtc.


    3. Rollbacking the overlay patches [37102264,37213431] 
    The details are:
    Reason -
    Superset Patch 37532350 has Subset Patch 37486199 which has overlay patches [37102264,37213431] and these overlay patches conflict with Superset Patch or are not included in Superest Patch


    If the last OJVM patch, for example, was p37499406_190000_MSWIN-x86-64.zip (OJVM Patch) then rollback by executing the
    opatch rollback -id 37499406 command and follow the steps to rollback.


    Rollback OJVM patch:-

    c:\Oracle19c\OPatch> opatch rollback -id 37102264




    Rollback JDK patch:-

    c:\Oracle19c\OPatch> opatch rollback -id 37213431







    Before Patch Need to set:

    set ORACLE_HOME=C:\Oracle19c
    set PATH=%ORACLE_HOME%\perl\bin;%PATH%
    set ORACLE_SID=ORCL
    set PERL5LIB=


    a. Applying Database Bundle Patch Below patch 

    p37532350_190000_MSWIN-x86-64.zip - (Database Bundle Patch)











    b.  Applying OJVM Patch 

    p37499406_190000_MSWIN-x86-64.zip (OJVM Patch)









    c. Applying JDK Bundle Patch

    p37542054_190000_MSWIN-x86-64.zip (JDK Bundle Patch) 





    After patching services setting  need to set as before and also need to start the services







    Verify OPatch succeeded using the following commands which will show the OPatch application results of database, OJVM and JDK patches:

    C:\opt\oracle\OPatch\opatch lsinventory -detail


    Re-start the Distributed Transaction Coordinator service, which is not an Oracle service, using the following command.

    net start msdtc


    Connect to SQL Plus using the following command:

    sqlplus / as sysdba

    SQL> startup 




    Execute the following command to complete the post-install SQL deployment for the patch being installed. This data patch command applies the patch to the database.

    C:\opt\Oracle\Opatch\datapatch -verbose








    Validating the database and OJVM Patches

    1. Connect to SQL Plus using the following command.

      sqlplus / as sysdba

    2. Query to check registry for patch history.

      SQL>select * from sys.registry$history;

    3. Query to check registry for installed patch.

      SQL>select * from sys.registry$sqlpatch ;

    4. Report output with patch details:

      SQL> set serveroutput on

      SQL> exec dbms_qopatch.get_sqlpatch_status;





    Note:- While applying patch if you face any issue , kill below process 






























    Friday, 21 November 2025

    How to Configure Observer in DG

     


    [oracle@oradba04-observ11t ~]$ . oraenv
    ORACLE_SID = [oracle] ? TEST
    The Oracle base has been changed from /home/oracle to /applications/oracle/d19.3.0/oracle_base
    [oracle@oradba04-observ11t ~]$
    [oracle@oradba04-observ11t ~]$
    [oracle@oradba04-observ11t ~]$ cd $ORACLE_HOME/network/admin
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ vi tnsnames.ora
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ tnsping SSDB
    
    TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 16-JAN-2025 17:27:55
    
    Copyright (c) 1997, 2024, Oracle.  All rights reserved.
    
    Used parameter files:
    
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.142)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SSDB) (UR = A)))
    OK (0 msec)
    
    
    
    [oracle@oradba04-observ11t admin]$ tnsping SSDBDG
    
    TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 16-JAN-2025 17:28:03
    
    Copyright (c) 1997, 2024, Oracle.  All rights reserved.
    
    Used parameter files:
    
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.144)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SSDBDG) (UR = A)))
    OK (0 msec)
    






    [oracle@oradba04-observ11t]$ dgmgrl sys/sys123@SSDB
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Thu Jan 16 17:30:21 2025
    Version 19.24.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "SSDB"
    Connected as SYSDBA.
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS   (status updated 40 seconds ago)
    
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration verbose;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
      Properties:
        FastStartFailoverThreshold      = '600'
        OperationTimeout                = '30'
        TraceLevel                      = 'USER'
        FastStartFailoverLagLimit       = '30'
        CommunicationTimeout            = '180'
        ObserverReconnect               = '30'
        FastStartFailoverLagGraceTime   = '0'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'
        ObserverOverride                = 'FALSE'
        ExternalDestination1            = ''
        ExternalDestination2            = ''
        PrimaryLostWriteAction          = 'CONTINUE'
        ConfigurationWideServiceName    = 'SSDB_CFG'
        FastStartFailoverLagType        = 'APPLY'
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS
    



    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ dgmgrl sys/sys123@SSDBDG
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Thu Jan 16 17:31:35 2025
    Version 19.24.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "SSDBDG"
    Connected as SYSDBA.
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS   (status updated 42 seconds ago)
    
    DGMGRL>





    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ dgmgrl sys/sys123@SSDBDG
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Thu Jan 16 17:31:35 2025
    Version 19.24.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "SSDBDG"
    Connected as SYSDBA.
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS   (status updated 42 seconds ago)
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration verbose;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
      Properties:
        FastStartFailoverThreshold      = '600'
        OperationTimeout                = '30'
        TraceLevel                      = 'USER'
        FastStartFailoverLagLimit       = '30'
        CommunicationTimeout            = '180'
        ObserverReconnect               = '30'
        FastStartFailoverLagGraceTime   = '0'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'
        ObserverOverride                = 'FALSE'
        ExternalDestination1            = ''
        ExternalDestination2            = ''
        PrimaryLostWriteAction          = 'CONTINUE'
        ConfigurationWideServiceName    = 'SSDB_CFG'
        FastStartFailoverLagType        = 'APPLY'
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS
    
    DGMGRL>
    DGMGRL>
    



    [oracle@oradba04-observ11t ~]$ cd $ORACLE_HOME/network/admin
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ ls -lrt
    total 12
    drwxr-xr-x 2 oracle oinstall 4096 Jan 10 10:46 samples
    -rw-r--r-- 1 oracle oinstall 1536 Jan 10 10:46 shrept.lst
    -rw-r--r-- 1 oracle oinstall  388 Jan 16 17:27 tnsnames.ora
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ vi tnsnames.ora
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ tnsping SSDB.WORLD
    
    TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 16-JAN-2025 17:41:24
    
    Copyright (c) 1997, 2024, Oracle.  All rights reserved.
    
    Used parameter files:
    
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.142)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SSDB) (UR=A)))
    OK (0 msec)
    
    
    
    
    [oracle@oradba04-observ11t admin]$ tnsping SSDBDG.WORLD
    
    TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 16-JAN-2025 17:41:33
    
    Copyright (c) 1997, 2024, Oracle.  All rights reserved.
    
    Used parameter files:
    
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.144)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SSDBDG) (UR=A)))
    OK (10 msec)
    





    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ echo $TNS_ADMIN
    /applications/oracle/d19.3.0/oracle_home/network/admin
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ dgmgrl
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Thu Jan 16 17:42:22 2025
    Version 19.24.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    DGMGRL>
    DGMGRL>
    DGMGRL> sys/sys123@SSDB.WORLD
    Unrecognized command "sys", try "help"
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> connect sys/sys123@SSDB.WORLD
    Connected to "SSDB"
    Connected as SYSDBA.
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS   (status updated 11 seconds ago)
    
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration verbose;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
      Properties:
        FastStartFailoverThreshold      = '600'
        OperationTimeout                = '30'
        TraceLevel                      = 'USER'
        FastStartFailoverLagLimit       = '30'
        CommunicationTimeout            = '180'
        ObserverReconnect               = '30'
        FastStartFailoverLagGraceTime   = '0'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'
        ObserverOverride                = 'FALSE'
        ExternalDestination1            = ''
        ExternalDestination2            = ''
        PrimaryLostWriteAction          = 'CONTINUE'
        ConfigurationWideServiceName    = 'SSDB_CFG'
        FastStartFailoverLagType        = 'APPLY'
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> exit





    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ dgmgrl sys/sys123@SSDBDG.WORLD
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Thu Jan 16 17:44:45 2025
    Version 19.24.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "SSDBDG"
    Connected as SYSDBA.
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS   (status updated 46 seconds ago)
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration verbose;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
      Properties:
        FastStartFailoverThreshold      = '600'
        OperationTimeout                = '30'
        TraceLevel                      = 'USER'
        FastStartFailoverLagLimit       = '30'
        CommunicationTimeout            = '180'
        ObserverReconnect               = '30'
        FastStartFailoverLagGraceTime   = '0'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'
        ObserverOverride                = 'FALSE'
        ExternalDestination1            = ''
        ExternalDestination2            = ''
        PrimaryLostWriteAction          = 'CONTINUE'
        ConfigurationWideServiceName    = 'SSDB_CFG'
        FastStartFailoverLagType        = 'APPLY'
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS
    
    DGMGRL>
    DGMGRL>
    DGMGRL> show database SSDB ObserverConnectIdentifier;
      ObserverConnectIdentifier = ''
    DGMGRL>
    DGMGRL>
    DGMGRL> show database SSDBDG ObserverConnectIdentifier;
      ObserverConnectIdentifier = ''
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> edit databae SSDB set property ObserverConnectIdentifier='SSDB.WORLd';
    edit databae SSDB set property ObserverConnectIdentifier='SSDB.WORLd';
         ^
    Syntax error before or at "databae"
    DGMGRL>
    DGMGRL>
    DGMGRL> edit database SSDB set property ObserverConnectIdentifier='SSDB.WORLd';
    Property "observerconnectidentifier" updated
    DGMGRL>
    DGMGRL>
    DGMGRL> edit database SSDBDG set property ObserverConnectIdentifier='SSDB.WORLd';
    Property "observerconnectidentifier" updated
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    
    DGMGRL>
    DGMGRL>
    DGMGRL> exit
    



    [oracle@oradba04-observ11t admin]$ dgmgrl sys/sys123@SSDBDG.WORLD
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Thu Jan 16 17:50:09 2025
    Version 19.24.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "SSDBDG"
    Connected as SYSDBA.
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS   (status updated 27 seconds ago)
    
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration verbose;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        ssdbdg - Physical standby database
    
      Properties:
        FastStartFailoverThreshold      = '600'
        OperationTimeout                = '30'
        TraceLevel                      = 'USER'
        FastStartFailoverLagLimit       = '30'
        CommunicationTimeout            = '180'
        ObserverReconnect               = '30'
        FastStartFailoverLagGraceTime   = '0'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'
        ObserverOverride                = 'FALSE'
        ExternalDestination1            = ''
        ExternalDestination2            = ''
        PrimaryLostWriteAction          = 'CONTINUE'
        ConfigurationWideServiceName    = 'SSDB_CFG'
        FastStartFailoverLagType        = 'APPLY'
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS
    
    DGMGRL>
    DGMGRL>
    DGMGRL> show fast_start failover;
    
    Fast-Start Failover:  Disabled
    
      Protection Mode:    MaxAvailability
      Lag Limit:          30 seconds
      Lag Type:           APPLY
    
      Threshold:          600 seconds
      Active Target:      (none)
      Potential Targets:  "ssdbdg"
        ssdbdg     valid
      Observer:           (none)
      Shutdown Primary:   TRUE
      Auto-reinstate:     TRUE
      Observer Reconnect: 30 seconds
      Observer Override:  FALSE
      Lag Grace Time:     0 seconds
    
    Configurable Failover Conditions
      Health Conditions:
        Corrupted Controlfile          YES
        Corrupted Dictionary           YES
        Inaccessible Logfile            NO
        Stuck Archiver                  NO
        Datafile Write Errors          YES
    
      Oracle Error Conditions:
        (none)
    
    DGMGRL>
    DGMGRL>
    DGMGRL> enable fast_start failover;
    Enabled in Zero Data Loss Mode.
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show fast_start failover;
    
    Fast-Start Failover: Enabled in Zero Data Loss Mode
    
      Protection Mode:    MaxAvailability
      Lag Limit:          30 seconds (not in use)
      Lag Type:           APPLY
    
      Threshold:          600 seconds
      Active Target:      ssdbdg
      Potential Targets:  "ssdbdg"
        ssdbdg     valid
      Observer:           (none)
      Shutdown Primary:   TRUE
      Auto-reinstate:     TRUE
      Observer Reconnect: 30 seconds
      Observer Override:  FALSE
      Lag Grace Time:     0 seconds
    
    Configurable Failover Conditions
      Health Conditions:
        Corrupted Controlfile          YES
        Corrupted Dictionary           YES
        Inaccessible Logfile            NO
        Stuck Archiver                  NO
        Datafile Write Errors          YES
    
      Oracle Error Conditions:
        (none)
    
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration verbose;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      SSDB   - Primary database
        Warning: ORA-16819: fast-start failover observer not started
    
        ssdbdg - (*) Physical standby database
          Warning: ORA-16819: fast-start failover observer not started
    
      (*) Fast-Start Failover target
    
      Properties:
        FastStartFailoverThreshold      = '600'
        OperationTimeout                = '30'
        TraceLevel                      = 'USER'
        FastStartFailoverLagLimit       = '30'
        CommunicationTimeout            = '180'
        ObserverReconnect               = '30'
        FastStartFailoverLagGraceTime   = '0'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'
        ObserverOverride                = 'FALSE'
        ExternalDestination1            = ''
        ExternalDestination2            = ''
        PrimaryLostWriteAction          = 'CONTINUE'
        ConfigurationWideServiceName    = 'SSDB_CFG'
        FastStartFailoverLagType        = 'APPLY'
    
    Fast-Start Failover: Enabled in Zero Data Loss Mode
      Lag Limit:          30 seconds (not in use)
      Lag Type:           APPLY
      Threshold:          600 seconds
      Active Target:      ssdbdg
      Potential Targets:  "ssdbdg"
        ssdbdg     valid
      Observer:           (none)
      Shutdown Primary:   TRUE
      Auto-reinstate:     TRUE
      Observer Reconnect: 30 seconds
      Observer Override:  FALSE
      Lag Grace Time:     0 seconds
    
    Configuration Status:
    WARNING
    
    DGMGRL>
    DGMGRL>
    DGMGRL> exit
    
    




    [oracle@oradba04-observ11t admin]$ nohup dgmgrl sys/Welcome#2024@SSDBDG.WORLD "start observer file='/applications/oracle/d19.3.0/oracle_home/dbs/fsfo.dat'" -logfile /home/oracle/OBSERVER_LOGS/observer.log &
    [1] 2221945
    [oracle@oradba04-observ11t admin]$ nohup: ignoring input and appending output to 'nohup.out'
    
    [1]+  Exit 255                nohup dgmgrl sys/Welcome#2024@SSDBDG.WORLD "start observer file='/applications/oracle/d19.3.0/oracle_home/dbs/fsfo.dat'" -logfile /home/oracle/OBSERVER_LOGS/observer.log
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$
    [oracle@oradba04-observ11t admin]$ cd
    [oracle@oradba04-observ11t ~]$
    [oracle@oradba04-observ11t ~]$
    [oracle@oradba04-observ11t ~]$
    [oracle@oradba04-observ11t ~]$
    [oracle@oradba04-observ11t ~]$ ls -lrt
    total 0
    drwxr-xr-x 2 oracle oinstall 26 Jan 16 17:59 OBSERVER_LOGS
    [oracle@oradba04-observ11t ~]$
    [oracle@oradba04-observ11t ~]$
    [oracle@oradba04-observ11t ~]$
    [oracle@oradba04-observ11t ~]$ cd OBSERVER_LOGS
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ ls -lrt
    total 4
    -rw-r----- 1 oracle oinstall 278 Jan 16 17:59 observer.log
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ tail -200f observer.log
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Thu Jan 16 17:59:00 2025
    Version 19.24.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    ORA-01017: invalid username/password; logon denied
    
    ^C
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ rm -rf observer.log
    
    
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ nohup dgmgrl sys/sys123@SSDBDG.WORLD "start observer file='/applications/oracle/d19.3.0/oracle_home/dbs/fsfo.dat'" -logfile /home/oracle/OBSERVER_LOGS/observer.log &
    [1] 2223598
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ nohup: ignoring input and appending output to 'nohup.out'
    
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ ls -lrt
    total 12
    -rw-r----- 1 oracle oinstall 269 Jan 16 18:00 observer.log
    -rw------- 1 oracle oinstall 280 Jan 16 18:00 nohup.out
    -rw-r----- 1 oracle oinstall 658 Jan 16 18:00 observer_oradba04-observ11t.log
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ tail -200f observer_oradba04-observ11t.log
    Observer 'oradba04-observ11t' started
    [W000 2025-01-16T18:00:18.609+01:00] Observer trace level is set to USER
    [W000 2025-01-16T18:00:18.609+01:00] Try to connect to the primary.
    [W000 2025-01-16T18:00:18.609+01:00] Try to connect to the primary SSDB.WORLD.
    [W000 2025-01-16T18:00:18.617+01:00] The standby ssdbdg is ready to be a FSFO target
    [W000 2025-01-16T18:00:18.617+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:00:19.617+01:00] Connection to the primary restored!
    [W000 2025-01-16T18:00:19.617+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:00:21.618+01:00] Disconnecting from database SSDB.WORLD.
    [W000 2025-01-16T18:00:49.669+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:00:50.669+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:01:20.721+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:01:21.722+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:01:51.764+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:01:52.768+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:02:22.809+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:02:23.810+01:00] Reconnecting to primary succeeded.
    ^C
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ dgmgrl sys/sys123@SSDBDG.WORLD
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Thu Jan 16 18:03:12 2025
    Version 19.24.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "SSDBDG"
    Connected as SYSDBA.
    DGMGRL>
    DGMGRL>
    DGMGRL> show observer;
    
    Configuration - DG_CONFIG
    
      Primary:            SSDB
      Active Target:      ssdbdg
    
    Observer "oradba04-observ11t"(19.24.0.0.0) - Master
    
      Host Name:                    oradba04-observ11t
      Last Ping to Primary:         0 seconds ago
      Last Ping to Target:          4 seconds ago
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> exit
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ ls -rlt
    total 12
    -rw-r----- 1 oracle oinstall  269 Jan 16 18:00 observer.log
    -rw------- 1 oracle oinstall  280 Jan 16 18:00 nohup.out
    -rw-r----- 1 oracle oinstall 2686 Jan 16 18:06 observer_oradba04-observ11t.log
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$
    [oracle@oradba04-observ11t OBSERVER_LOGS]$ tail -200f observer_oradba04-observ11t.log
    Observer 'oradba04-observ11t' started
    [W000 2025-01-16T18:00:18.609+01:00] Observer trace level is set to USER
    [W000 2025-01-16T18:00:18.609+01:00] Try to connect to the primary.
    [W000 2025-01-16T18:00:18.609+01:00] Try to connect to the primary SSDB.WORLD.
    [W000 2025-01-16T18:00:18.617+01:00] The standby ssdbdg is ready to be a FSFO target
    [W000 2025-01-16T18:00:18.617+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:00:19.617+01:00] Connection to the primary restored!
    [W000 2025-01-16T18:00:19.617+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:00:21.618+01:00] Disconnecting from database SSDB.WORLD.
    [W000 2025-01-16T18:00:49.669+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:00:50.669+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:01:20.721+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:01:21.722+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:01:51.764+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:01:52.768+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:02:22.809+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:02:23.810+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:02:53.852+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:02:54.853+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:03:24.896+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:03:25.899+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:03:55.945+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:03:56.945+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:04:26.987+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:04:27.987+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:04:57.029+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:04:58.033+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:05:28.077+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:05:29.078+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:05:59.118+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:06:00.119+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:06:30.160+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:06:31.166+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:07:01.206+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:07:02.207+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:07:32.251+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:07:33.251+01:00] Reconnecting to primary succeeded.
    [W000 2025-01-16T18:08:03.294+01:00] Reconnect interval expired, connecting to primary database.
    [W000 2025-01-16T18:08:04.298+01:00] Reconnecting to primary succeeded.
    






































    Reinstate a failed over Data Guard using Flashback Database

     

    In Oracle 19c Data Guard, reinstatement refers to the process of bringing a former primary database back into the Data Guard configuration as a standby after a failover has occurred. This is a critical feature that avoids the need for a full restore from backup.




    Why Reinstatement Is Needed

    • When a failover happens, the original primary becomes inconsistent with the new primary.
    • To reuse the old primary as a standby, it must be rolled back to a point in time before the failover.
    • Oracle uses Flashback Database for this rollback, which is why flashback must be enabled on the old primary.



    Prerequisites for Reinstatement

    1. Flashback Database Enabled on the old primary.
    2. Fast Recovery Area (FRA) configured and sized properly.
    3. The database must be part of the Data Guard Broker configuration.
    4. No physical corruption or missing redo logs that prevent flashback.


    How Reinstatement Works

    • Data Guard Broker issues a command to flashback the old primary to the SCN where it can act as a standby.
    • After flashback, the database is converted to a standby role and starts applying redo from the new primary.





    [oracle@oradba01-A52DR ~]$ . oraenv
    ORACLE_SID = [oracle] ? A52DR
    The Oracle base has been set to /oracle/A52
    [oracle@oradba01-A52DR ~]$
    [oracle@oradba01-A52DR ~]$
    [oracle@oradba01-A52DR ~]$
    [oracle@oradba01-A52DR ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jun 30 19:39:08 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2023, Oracle.  All rights reserved.
    
    Connected to an idle instance.
    
    SQL> startup nomount;
    ORACLE instance started.
    
    Total System Global Area 8489269064 bytes
    Fixed Size                  8959816 bytes
    Variable Size            4244635648 bytes
    Database Buffers         4227858432 bytes
    Redo Buffers                7815168 bytes
    SQL>
    SQL>
    SQL>
    SQL> alter database mount;
    
    Database altered.
    
    SQL>
    SQL>
    SQL>
    SQL> @dg_status
    
    INSTANCE_NAME   HOST_NAME      STATUS   DATABASE_STATUS PROTECTION_MODE      INSTANCE_ROLE      VERSION_FULL    DATABASE_ROLE
    --------------- -------------- -------- --------------- -------------------- ------------------ --------------- ------------------
    A52DR           oradba01-A52DR  MOUNTED  ACTIVE          MAXIMUM AVAILABILITY PRIMARY_INSTANCE   19.22.0.0.0     PRIMARY
    
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> select name, open_mode, database_role, switchover_status, protection_mode from v$database;
    
    NAME      OPEN_MODE            DATABASE_ROLE      SWITCHOVER_STATUS    PROTECTION_MODE
    --------- -------------------- ------------------ -------------------- --------------------
    A52       MOUNTED              PRIMARY            NOT ALLOWED          MAXIMUM AVAILABILITY
    
    SQL>
    SQL>
    SQL>  select FS_FAILOVER_STATUS,FS_FAILOVER_OBSERVER_PRESENT from v$database;
    
    FS_FAILOVER_STATUS     FS_FAIL
    ---------------------- -------
    DISABLED



    [oracle@oradba01-A52DR]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jun 30 20:05:49 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2023, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.22.0.0.0
    
    SQL> alter database open;
    alter database open
    *
    ERROR at line 1:
    ORA-38760: This database instance failed to turn on flashback database
    
    
    SQL>
    SQL>
    SQL> show parameter flashback
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_flashback_retention_target        integer     360
    
    SQL> show parameter flash
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_flash_cache_file                  string
    db_flash_cache_size                  big integer 0
    db_flashback_retention_target        integer     360
    
    SQL> select flashback_on from v$database;
    
    FLASHBACK_ON
    ------------------
    YES
    
    SQL>
    SQL>
    SQL> SELECT FLASHBACK_ON FROM V$DATABASE;
    
    FLASHBACK_ON
    ------------------
    YES
    
    
    SQL> alter database open;
    alter database open
    *
    ERROR at line 1:
    ORA-38760: This database instance failed to turn on flashback database
    



    ==============================
    Database Instance:-
    ==============================
    A52   - Primary
    A52DR - Standby
    
    Note:- Primary  (A52) DB was down (mount) state and  A52DR became Primary and not able to start DB, so aftersome we reinstate
    
    [oracle@oradba01-A52DR]$ sqlplus / as sysdba
    
    SQL> @dg_status
    
    INSTANCE_NAME   HOST_NAME      STATUS   DATABASE_STATUS PROTECTION_MODE      INSTANCE_ROLE      VERSION_FULL    DATABASE_ROLE
    --------------- -------------- -------- --------------- -------------------- ------------------ --------------- ------------------
    A52DR           oradba01-A52DR MOUNTED  ACTIVE          MAXIMUM AVAILABILITY PRIMARY_INSTANCE   19.22.0.0.0     PRIMARY
    
    
    SQL>
    SQL> select name, open_mode, database_role, switchover_status, protection_mode from v$database;
    
    NAME      OPEN_MODE            DATABASE_ROLE      SWITCHOVER_STATUS    PROTECTION_MODE
    --------- -------------------- ------------------ -------------------- --------------------
    A52       MOUNTED              PRIMARY            NOT ALLOWED          MAXIMUM AVAILABILITY
    



    [oracle@oradba01-A52DR]$ dgmgrl /
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Mon Jun 30 20:13:15 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "A52DR"
    Connected as SYSDG.
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      A52dr - Primary database
        Error: ORA-16810: multiple errors or warnings detected for the member
    
        A52   - Physical standby database (disabled)
          ORA-16661: the standby database needs to be reinstated
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    ERROR   (status updated 31 seconds ago)
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> reinstate database 'A52';
    Reinstating database "A52", please wait...
    Reinstatement of database "A52" succeeded
    
    
    
    
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      A52dr - Primary database
        Error: ORA-16782: instance not open for read and write access
    
        A52   - Physical standby database
          Warning: ORA-16809: multiple warnings detected for the member
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    ERROR   (status updated 21 seconds ago)
    



    [oracle@oradba01-A52DR ]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jun 30 20:15:21 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2023, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.22.0.0.0
    
    SQL>
    SQL>
    SQL>
    SQL> @dg_status
    
    INSTANCE_NAME   HOST_NAME      STATUS   DATABASE_STATUS PROTECTION_MODE      INSTANCE_ROLE      VERSION_FULL    DATABASE_ROLE
    --------------- -------------- -------- --------------- -------------------- ------------------ --------------- ------------------
    A52DR           oradba01-A52DR  MOUNTED  ACTIVE          MAXIMUM AVAILABILITY PRIMARY_INSTANCE   19.22.0.0.0     PRIMARY
    
    SQL>
    SQL>
    SQL>
    SQL> alter database open;
    alter database open
    *
    ERROR at line 1:
    ORA-38760: This database instance failed to turn on flashback database
    
    
    SQL> shut immediate;
    ORA-01109: database not open
    
    
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    SQL>
    SQL>
    SQL> exit
    Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.22.0.0.0
    
    
    
    [oracle@oradba01-A52DR dba_scripts]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jun 30 20:17:08 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2023, Oracle.  All rights reserved.
    
    Connected to an idle instance.
    
    SQL> startup nomount;
    ORACLE instance started.
    
    Total System Global Area 8489269064 bytes
    Fixed Size                  8959816 bytes
    Variable Size            4244635648 bytes
    Database Buffers         4227858432 bytes
    Redo Buffers                7815168 bytes
    SQL>
    SQL>
    SQL> alter database mount;
    
    Database altered.
    
    SQL>
    SQL>
    SQL> show parameter db_recovery_file_dest;
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_recovery_file_dest                string
    db_recovery_file_dest_size           big integer 300G
    
    SQL> show parameter db_flashback_retention_target;
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_flashback_retention_target        integer     360
    SQL>
    SQL>
    SQL>
    SQL> select flashback_on from v$database;
    
    FLASHBACK_ON
    ------------------
    YES
    
    SQL>
    SQL>
    SQL>
    SQL> alter database open;
    alter database open
    *
    ERROR at line 1:
    ORA-38760: This database instance failed to turn on flashback database
    
    
    SQL>
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> alter database flashback off;
    
    Database altered.
    
    SQL>
    SQL>
    SQL> alter database open;
    
    Database altered.
    
    SQL>
    SQL>
    SQL>
    SQL> @dg_status
    
    INSTANCE_NAME   HOST_NAME      STATUS   DATABASE_STATUS PROTECTION_MODE      INSTANCE_ROLE      VERSION_FULL    DATABASE_ROLE
    --------------- -------------- -------- --------------- -------------------- ------------------ --------------- ------------------
    A52DR           oradba01-A52DR  OPEN     ACTIVE          MAXIMUM AVAILABILITY PRIMARY_INSTANCE   19.22.0.0.0     PRIMARY
    
    SQL>
    SQL>
    SQL>
    SQL> archive log list;
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            +ARCH/A52dr/oraarch
    Oldest online log sequence     1
    Next log sequence to archive   4
    Current log sequence           4
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> alter system switch logfile;
    
    System altered.
    
    SQL>
    SQL>
    SQL>
    SQL> /
    /
    System altered.
    
    SQL>/
    
    System altered.
    
    SQL> /
    
    System altered.
    
    SQL>
    SQL>
    SQL>
    SQL> alter database flashback on;
    alter database flashback on
    *
    ERROR at line 1:
    ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
    ORA-38709: Recovery Area is not enabled.
    
    
    SQL>
    SQL>
    SQL>
    SQL> show parameter recovery
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_recovery_file_dest                string
    db_recovery_file_dest_size           big integer 300G
    recovery_parallelism                 integer     0
    remote_recovery_file_dest            string
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> set lines 200 pages 200;
    col name for a13
    Select NAME, round ((TOTAL_MB/1024), 2) Total_GB,
    round ((FREE_MB/1024),2) Free_GB,
    round((TOTAL_MB/1024),2) - round((FREE_MB/1024),2) Used_GB,
    round(((free_mb/total_mb)*100),2) "FREE% ",
    round((((total_mb-free_mb)/total_mb)*100),2) "USED%"
    from v$asm_diskgroup;SQL> SQL>   2    3    4    5    6
    
    NAME            TOTAL_GB    FREE_GB    USED_GB     FREE%       USED%
    ------------- ---------- ---------- ---------- ---------- ----------
    ARCH                 512     508.47       3.53      99.31        .69
    DATA                1024      449.5      574.5       43.9       56.1
    FRA                  300     299.89        .11      99.96        .04
    
    SQL>
    SQL>
    SQL> alter system set db_recovery_file_dest='+FRA' scope=both;
    
    System altered.
    
    SQL>
    SQL>
    SQL> alter database flashback on;
    
    Database altered.
    
    SQL>
    SQL>
    SQL>
    SQL> select flashback_on from v$database;
    
    FLASHBACK_ON
    ------------------
    YES
    
    SQL>
    SQL>
    SQL> exit
    Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.22.0.0.0
    




    [oracle@oradba01-A52DR dba_scripts]$ dgmgrl /
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Mon Jun 30 20:40:22 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "A52DR"
    Connected as SYSDG.
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      A52dr - Primary database
        A52   - Physical standby database
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS   (status updated 51 seconds ago)
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show observer;
    
    Configuration - DG_CONFIG
    
    Fast-Start Failover: DISABLED
    
    No observers.
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> validate database A52dr;
    
      Database Role:    Primary database
    
      Ready for Switchover:  Yes
    
      Managed by Clusterware:
        A52dr:  YES
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> validate database verbose A52;
    
      Database Role:     Physical standby database
      Primary Database:  A52dr
    
      Ready for Switchover:  Yes
      Ready for Failover:    Yes (Primary Running)
    
      Flashback Database Status:
        A52dr:  On
        A52  :  On
    
      Capacity Information:
        Database  Instances        Threads
        A52dr     1                1
        A52       1                1
    
      Managed by Clusterware:
        A52dr:  YES
        A52  :  YES
    
      Temporary Tablespace File Information:
        A52dr TEMP Files:  10
        A52 TEMP Files:    10
    
      Data file Online Move in Progress:
        A52dr:  No
        A52:    No
    
      Standby Apply-Related Information:
        Apply State:      Running
        Apply Lag:        0 seconds (computed 0 seconds ago)
        Apply Delay:      0 minutes
    
      Transport-Related Information:
        Transport On:  Yes
        Gap Status:    No Gap
        Transport Lag:  0 seconds (computed 0 seconds ago)
        Transport Status:  Success
    
      Log Files Cleared:
        A52dr Standby Redo Log Files:  Cleared
        A52 Online Redo Log Files:     Cleared
        A52 Standby Redo Log Files:    Available
    
      Current Log File Groups Configuration:
        Thread #  Online Redo Log Groups  Standby Redo Log Groups Status
                  (A52dr)                 (A52)
        1         4                       4                       Sufficient SRLs
    
      Future Log File Groups Configuration:
        Thread #  Online Redo Log Groups  Standby Redo Log Groups Status
                  (A52)                   (A52dr)
        1         4                       4                       Sufficient SRLs
    
      Current Configuration Log File Sizes:
        Thread #   Smallest Online Redo      Smallest Standby Redo
                   Log File Size             Log File Size
                   (A52dr)                   (A52)
        1          200 MBytes                200 MBytes
    
      Future Configuration Log File Sizes:
        Thread #   Smallest Online Redo      Smallest Standby Redo
                   Log File Size             Log File Size
                   (A52)                     (A52dr)
        1          200 MBytes                200 MBytes
    
      Apply-Related Property Settings:
        Property                        A52dr Value              A52 Value
        DelayMins                       0                        0
        ApplyParallel                   AUTO                     AUTO
        ApplyInstances                  0                        0
    
      Transport-Related Property Settings:
        Property                        A52dr Value              A52 Value
        LogShipping                     ON                       ON
        LogXptMode                      SYNC                     SYNC
        Dependency                      <empty>                  <empty>
        DelayMins                       0                        0
        Binding                         OPTIONAL                 optional
        MaxFailure                      0                        0
        ReopenSecs                      300                      300
        NetTimeout                      30                       30
        RedoCompression                 DISABLE                  DISABLE
    
    DGMGRL>
    DGMGRL>
    DGMGRL> exit
    [oracle@oradba01-A52DR dba_scripts]$
    [oracle@oradba01-A52DR dba_scripts]$
    [oracle@oradba01-A52DR dba_scripts]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jun 30 20:44:50 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2023, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.22.0.0.0
    
    SQL> @lag
    
        Thread Last Sequence Received Last Sequence Applied Difference
    ---------- ---------------------- --------------------- ----------
             1                      9                     9          0
             1                      9                     9          0
    
    SQL>
    SQL>
    SQL>
    SQL> exit
    Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.22.0.0.0
    
    
    




    [oracle@oradba01-A52DR]$ . oraenv
    ORACLE_SID = [A52DR] ?
    The Oracle base remains unchanged with value /oracle/A52
    
    
    [oracle@oradba01-A52DR ]$
    [oracle@oradba01-A52DR ]$
    [oracle@oradba01-A52DR ]$ dgmgrl
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Mon Jun 30 20:46:19 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    
    DGMGRL> connect sys/sys123
    Connected to "A52DR"
    Connected as SYSDBA.
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      A52dr - Primary database
        A52   - Physical standby database
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS   (status updated 12 seconds ago)
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> show configuration verbose;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      A52dr - Primary database
        A52   - Physical standby database
    
      Properties:
        FastStartFailoverThreshold      = '600'
        OperationTimeout                = '30'
        TraceLevel                      = 'USER'
        FastStartFailoverLagLimit       = '30'
        CommunicationTimeout            = '180'
        ObserverReconnect               = '30'
        FastStartFailoverLagGraceTime   = '0'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'
        ObserverOverride                = 'FALSE'
        ExternalDestination1            = ''
        ExternalDestination2            = ''
        PrimaryLostWriteAction          = 'CONTINUE'
        ConfigurationWideServiceName    = 'A52_CFG'
        FastStartFailoverLagType        = 'APPLY'
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> validate database A52dr;
    
      Database Role:    Primary database
    
      Ready for Switchover:  Yes
    
      Managed by Clusterware:
        A52dr:  YES
    
    DGMGRL>
    DGMGRL>
    DGMGRL> validate database verbose A52;
    
      Database Role:     Physical standby database
      Primary Database:  A52dr
    
      Ready for Switchover:  Yes
      Ready for Failover:    Yes (Primary Running)
    
      Flashback Database Status:
        A52dr:  On
        A52  :  On
    
      Capacity Information:
        Database  Instances        Threads
        A52dr     1                1
        A52       1                1
    
      Managed by Clusterware:
        A52dr:  YES
        A52  :  YES
    
      Temporary Tablespace File Information:
        A52dr TEMP Files:  10
        A52 TEMP Files:    10
    
      Data file Online Move in Progress:
        A52dr:  No
        A52:    No
    
      Standby Apply-Related Information:
        Apply State:      Running
        Apply Lag:        0 seconds (computed 1 second ago)
        Apply Delay:      0 minutes
    
      Transport-Related Information:
        Transport On:  Yes
        Gap Status:    No Gap
        Transport Lag:  0 seconds (computed 1 second ago)
        Transport Status:  Success
    
      Log Files Cleared:
        A52dr Standby Redo Log Files:  Cleared
        A52 Online Redo Log Files:     Cleared
        A52 Standby Redo Log Files:    Available
    
      Current Log File Groups Configuration:
        Thread #  Online Redo Log Groups  Standby Redo Log Groups Status
                  (A52dr)                 (A52)
        1         4                       4                       Sufficient SRLs
    
      Future Log File Groups Configuration:
        Thread #  Online Redo Log Groups  Standby Redo Log Groups Status
                  (A52)                   (A52dr)
        1         4                       4                       Sufficient SRLs
    
      Current Configuration Log File Sizes:
        Thread #   Smallest Online Redo      Smallest Standby Redo
                   Log File Size             Log File Size
                   (A52dr)                   (A52)
        1          200 MBytes                200 MBytes
    
      Future Configuration Log File Sizes:
        Thread #   Smallest Online Redo      Smallest Standby Redo
                   Log File Size             Log File Size
                   (A52)                     (A52dr)
        1          200 MBytes                200 MBytes
    
      Apply-Related Property Settings:
        Property                        A52dr Value              A52 Value
        DelayMins                       0                        0
        ApplyParallel                   AUTO                     AUTO
        ApplyInstances                  0                        0
    
      Transport-Related Property Settings:
        Property                        A52dr Value              A52 Value
        LogShipping                     ON                       ON
        LogXptMode                      SYNC                     SYNC
        Dependency                      <empty>                  <empty>
        DelayMins                       0                        0
        Binding                         OPTIONAL                 optional
        MaxFailure                      0                        0
        ReopenSecs                      300                      300
        NetTimeout                      30                       30
        RedoCompression                 DISABLE                  DISABLE
    
    DGMGRL>
    DGMGRL>
    DGMGRL>


    set lines 200
    col WINDOW_NAME for a25
    col WINDOW_NEXT_TIME for a45
    select WINDOW_NAME,WINDOW_NEXT_TIME,OPTIMIZER_STATS,WINDOW_ACTIVE,AUTOTASK_STATUS from DBA_AUTOTASK_WINDOW_CLIENTS;
    
    
    WINDOW_NAME               WINDOW_NEXT_TIME                              OPTIMIZE WINDO AUTOTASK
    ------------------------- --------------------------------------------- -------- ----- --------
    MONDAY_WINDOW             03-MAR-25 10.00.00.000000 PM EUROPE/VIENNA    ENABLED  FALSE ENABLED
    TUESDAY_WINDOW            04-MAR-25 10.00.00.000000 PM EUROPE/VIENNA    ENABLED  FALSE ENABLED
    WEDNESDAY_WINDOW          26-FEB-25 10.00.00.000000 PM EUROPE/VIENNA    ENABLED  FALSE ENABLED
    THURSDAY_WINDOW           27-FEB-25 10.00.00.000000 PM EUROPE/VIENNA    ENABLED  FALSE ENABLED
    FRIDAY_WINDOW             28-FEB-25 10.00.00.000000 PM EUROPE/VIENNA    ENABLED  FALSE ENABLED
    SATURDAY_WINDOW           01-MAR-25 06.00.00.000000 AM EUROPE/VIENNA    ENABLED  FALSE ENABLED
    SUNDAY_WINDOW             02-MAR-25 06.00.00.000000 AM EUROPE/VIENNA    ENABLED  FALSE ENABLED
    
    7 rows selected.


    [oracle@oradba01-A52DR]$ dgmgrl sys/sys123@A52DR.WORLD
    DGMGRL for Linux: Release 19.0.0.0.0 - Production on Mon Jun 30 20:48:22 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "A52DR"
    Connected as SYSDBA.
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> validate database A52DR;
    
      Database Role:    Primary database
    
      Ready for Switchover:  Yes
    
      Managed by Clusterware:
        A52dr:  YES
    
    DGMGRL> VALIDATE DATABASE A52;
    
      Database Role:     Physical standby database
      Primary Database:  A52dr
    
      Ready for Switchover:  Yes
      Ready for Failover:    Yes (Primary Running)
    
      Managed by Clusterware:
        A52dr:  YES
        A52  :  YES
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> validate static connect identifier for all;
    Oracle Clusterware on database "A52" is available for database restart.
    
    Oracle Clusterware on database "A52dr" is available for database restart.
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> SWITCHOVER TO A52;
    Performing switchover NOW, please wait...
    Operation requires a connection to database "A52"
    Connecting ...
    Connected to "A52"
    Connected as SYSDBA.
    New primary database "A52" is opening...
    Oracle Clusterware is restarting database "A52dr" ...
    Connected to an idle instance.
    Connected to an idle instance.
    Connected to an idle instance.
    Connected to an idle instance.
    Connected to "A52DR"
    Switchover succeeded, new primary is "A52"
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> SHOW CONFIGURATION;
    
    Configuration - DG_CONFIG
    
      Protection Mode: MaxAvailability
      Members:
      A52   - Primary database
        A52dr - Physical standby database
    
    Fast-Start Failover:  Disabled
    
    Configuration Status:
    SUCCESS   (status updated 49 seconds ago)
    
    DGMGRL>
    DGMGRL>
    DGMGRL>
    DGMGRL> exit
    [oracle@oradba01-A52DR]$
    [oracle@oradba01-A52DR]$
    [oracle@oradba01-A52DR]$ . oraenv
    ORACLE_SID = [A52DR] ?
    The Oracle base remains unchanged with value /oracle/A52
    [oracle@oradba01-A52DR dba_scripts]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jun 30 20:52:49 2025
    Version 19.22.0.0.0
    
    Copyright (c) 1982, 2023, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.22.0.0.0
    
    SQL> @dg_status
    
    INSTANCE_NAME   HOST_NAME      STATUS   DATABASE_STATUS PROTECTION_MODE      INSTANCE_ROLE      VERSION_FULL    DATABASE_ROLE
    --------------- -------------- -------- --------------- -------------------- ------------------ --------------- ------------------
    A52DR           oradba01-A52DR  MOUNTED  ACTIVE          MAXIMUM AVAILABILITY PRIMARY_INSTANCE   19.22.0.0.0     PHYSICAL STANDBY
    




    Oracle database patching - Windows Database Apr2025 Bundle Patch 19.27.0.0.250415

      Description:- Step by Step Applying PSU Patch in Oracle 19c in Windows Environment Prerequisites to Apply Patch :-Database Release Update ...