Forum Stats

  • 3,837,113 Users
  • 2,262,228 Discussions
  • 7,900,208 Comments

Discussions

patch a standalone database running on ASM instance and Physical Standby database

User_PAY83
User_PAY83 Member Posts: 28 Blue Ribbon
edited Jun 22, 2022 5:43AM in Database Upgrade

Environment:

Standalone database 19c (19.0.0.0) running on ASM instance with a remote physical standby database on WINDOWS 2012 R2 operating system. Oracle restart configured on the servers.

Problem:

1- Best way to stop Oracle components ? i.e. when I am using "srvctl" commands or "sys" and "sysasm" user to stop database and ASM instance the windows services still showing "running" status.

2- Do I need to first patch "GRID home" and start ASM service and then patch "database" home like RAC OR patch "GRID home" and "DB home" at the same time while all services are in stop state ?

In APRIL security patch read me file, it talks about RAC database procedure and DB standalone procedure but not talk about standalone DB running on ASM.

Plus in ready only file it says, apply patch first in standby environment then in PRODUCTION is it compulsory ? or we can apply patch first in Production and then on standby after testing the application ?

Any help would be appreciated.

Answers

  • Riaz.
    Riaz. Member Posts: 36 Bronze Badge

    Hi,

    (1) This is what I do for the databases on Windows:

    <code>

    set oracle_Sid=<sid>

    set oracle_Home=<HomePath>

    %ORACLE_HOME%\bin\srvctl stop database -d <DBName> -o immediate

    net stop OracleService%ORACLE_SID%

    net stop OracleVssWriter%ORACLE_SID%

    net stop Winmgmt /Y

    net stop msdtc

    </code>

    (2) Apply patch to GI home; as part of patching it will start GI components including ASM (rootcrs.bat -postpatch). Then you can apply the patch to database(s).

    (3) If you want to apply the patch to production first (usually we apply the patch to standby first, to make sure everything works fine), then you can disable the log shipping, apply patch to production (plus datapatch) and then standby. Followed by that, you can enable the log shipping.

    Regards,


    Regards,

    User_PUODS
  • User_PUODS
    User_PUODS Member Posts: 1 Green Ribbon

    Thanks Riaz for you detail reply :) one thing needs to check:

    If we apply patch on standby first, how can we test our application to check if everything is working fine ? Application running from Primary, is it possible to do "switchover or fail over" after apply patch on standby database to avoid any data loss.

  • Riaz.
    Riaz. Member Posts: 36 Bronze Badge
    edited Jul 22, 2022 9:39AM

    Please check below document:

    Oracle Patch Assurance - Data Guard Standby-First Patch Apply (Doc ID 1265700.1)

    In short, you can open standby as read-only to test read-only workload or as snapshot standby to test read-write workload.

    Edit: You can also do a switchover to standby, if you want.