Introduction

Patching your Oracle Database Appliance (ODA) is highly recommended: once a year being the minimum you could do. It prevents security risks, fixes some bugs and eventually provides new features. And it also keeps your appliance supported: according to MOS note 2757884.1, your ODA should be running version 19.16 for X7-2 series, X8-2 series and X9-2 series, and version 19.20.0.1 for X10 series.

Regular patching also allows one step patching: you can jump to the latest release without intermediate versions. But patching all the components to the very latest release is not always possible. In my example for today, patching the database to 19.20 was not possible because of a bug that would have a big impact on customer’s application. The ODA was running on 19.17, and the plan was to apply 19.20, the latest one available at this time. What is the alternate plan for keeping the databases to previous 19.19?

Keep everything aligned, yes but…

The first option would be patching all the components to 19.19. So everything would have been aligned in the describe-component command. The problem is that 19.19 is rather old, from May 2023. For a patching done in December, my ODA wouldn’t have been so up-to-date staying in 19.19.

The second option would be patching the system and storage components to 19.20 and patching the database to 19.19. This is a supported configuration, and I could eventually upgrade my databases later from 19.19 to 19.20 if needed.

Here is how you can achieve this hybrid configuration.

Patching the system and storage components to 19.20

First steps of patching won’t be different compared to a full 19.20 patch. You will need to download the 19.20 patch, the 19.20 GI home, register these files in the ODA registry, patch the DCS components, do the precheck for the system patch, apply the system patch, do the precheck for the storage patch and apply the storage patch. Here are the commands I used in this case:

odacli update-repository -f /backup/ODA_patch/oda-sm-19.20.0.0.0-230802.1-server.zip,/backup/ODA_patch/odacli-dcs-19.20.0.0.0-230720-GI-19.20.0.0.zip
odacli update-dcsadmin -v 19.20.0.0.0
odacli update-dcscomponents -v 19.20.0.0.0
odacli update-dcsagent -v 19.20.0.0.0
odacli create-prepatchreport -s -v 19.20.0.0.0
odacli update-server -v 19.20.0.0.0
odacli create-prepatchreport -st -v 19.20.0.0.0
odacli update-storage -v 19.20.0.0.0

Don’t forget to check the versions with odacli describe-component after each update.

Once done, your system and storage are updated to 19.20, and your databases are still running on 19.17 DB homes.

Updating your DB homes to 19.19

I will patch the DB homes, meaning it will also patch all the databases using these DB homes. First, list your DB homes:

odacli list-dbhomes
ID                                       Name                 DB Version                               DB Edition Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- ---------- --------------------------------------------- ----------
896ce25f-c05f-4765-986b-db807a26e150     OraDB19000_home6     19.17.0.0.221018                         EE         /u01/app/odaorahome/oracle/product/19.0.0     CONFIGURED
                                                                                                                  .0/dbhome_6                  
2caf70b0-8af1-4b17-8410-00de77f0949d     OraDB19000_home7     19.17.0.0.221018                         EE         /u01/app/odaorahome/oracle/product/19.0.0     CONFIGURED
														  .0/dbhome_7                  

Now, you will need to register the 19.19 patch. When applying a patch, the target version should be in the ODA registry, only registering the DB clone is not enough:

odacli update-repository -f /backup/ODA_patch/oda-sm-19.19.0.0.0-230510-server.zip

odacli describe-job -i "b7f966c0-4996-44a2-a2ac-11e2175c2404"
Job details
----------------------------------------------------------------
                     ID:  b7f966c0-4996-44a2-a2ac-11e2175c2404
            Description:  Repository Update
                 Status:  Success
                Created:  December 2, 2023 10:12:35 AM CET
                Message:  /backup/ODA_patch/oda-sm-19.19.0.0.0-230510-server.zip

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Unzip bundle                             December 2, 2023 10:12:36 AM CET    December 2, 2023 10:13:05 AM CET    Success



odacli update-repository -f /backup/ODA_patch/odacli-dcs-19.19.0.0.0-230510-DB-19.19.0.0.zip

odacli describe-job -i "70c965dc-1b13-4c55-80bf-a028fcc9b5ef"
Job details
----------------------------------------------------------------
                     ID:  70c965dc-1b13-4c55-80bf-a028fcc9b5ef
            Description:  Repository Update
                 Status:  Success
                Created:  December 2, 2023 10:17:53 AM CET
                Message:  /backup/ODA_patch/odacli-dcs-19.19.0.0.0-230510-DB-19.19.0.0.zip

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Unzip bundle                             December 2, 2023 10:17:53 AM CET    December 2, 2023 10:18:32 AM CET    Success

I will need to do a precheck on both DB homes, let’s start with the first one:

odacli create-prepatchreport -d -i 896ce25f-c05f-4765-986b-db807a26e150 -v 19.19.0.0.0

odacli describe-prepatchreport -i 1ff22fc8-9613-483f-bb83-3f245452a6eb
Patch pre-check report
------------------------------------------------------------------------
                 Job ID:  1ff22fc8-9613-483f-bb83-3f245452a6eb
            Description:  Patch pre-checks for [DB, ORACHKDB]: DbHome is OraDB19000_home6
                 Status:  FAILED
                Created:  December 2, 2023 10:36:21 AM CET
                 Result:  One or more pre-checks failed for [ORACHK]

Node Name
---------------
uns-oda1

Pre-Check                      Status   Comments
------------------------------ -------- --------------------------------------
__DB__
Validate DB Home ID             Success   Validated DB Home ID:
                                          896ce25f-c05f-4765-986b-db807a26e150
Validate patching tag           Success   Validated patching tag: 19.19.0.0.0.
Is system provisioned           Success   Verified system is provisioned
Validate minimum agent version  Success   Validated minimum agent version
Is GI upgraded                  Success   Validated GI is upgraded
Validate available space for    Success   Validated free space required under
db                                        /u01
Validate dbHomesOnACFS          Success   User has configured disk group for
configured                                Database homes on ACFS
Validate Oracle base            Success   Successfully validated Oracle Base
Is DB clone available           Success   Successfully validated clone file
                                          exists
Evaluate DBHome patching with   Success   Successfully validated updating
RHP                                       dbhome with RHP.  and local patching
                                          is possible
Validate command execution      Success   Validated command execution

__ORACHK__
Running orachk                  Failed    ORAchk validation failed: .
Validate command execution      Success   Validated command execution
Check for parameter             Failed    AHF-3744: Database parameter
global_names                              GLOBAL_NAMES is not set to
                                          recommended value
Check for parameter recyclebin  Failed    AHF-1679: RECYCLEBIN on PRIMARY
                                          should be set to the recommended value

Most often, the precheck will fail on Orachk, but having different parameters than those recommended will not prevent your database to be patched. If everything but Orachk is OK, you can apply the patch with the force option. Note that the patching won’t upgrade your DB home but will create a new one and move the databases in this new home, then will apply the datapatch on all the databases. If your DB home runs Standby databases, they will be moved but no datapatch will be applied.

odacli update-dbhome -i 896ce25f-c05f-4765-986b-db807a26e150 -v 19.19.0.0.0 -f
odacli describe-job -i "059d3052-9e17-4397-8551-c3a9e1df0b24"
Job details
----------------------------------------------------------------
                     ID:  059d3052-9e17-4397-8551-c3a9e1df0b24
            Description:  DB Home Patching: Home Id is 896ce25f-c05f-4765-986b-db807a26e150
                 Status:  Success
                Created:  December 2, 2023 10:49:35 AM CET
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Creating wallet for DB Client            December 2, 2023 10:49:43 AM CET    December 2, 2023 10:49:43 AM CET    Success
Patch databases by RHP - [PCSW]          December 2, 2023 10:49:43 AM CET    December 2, 2023 10:55:10 AM CET    Success
Updating database metadata               December 2, 2023 10:55:10 AM CET    December 2, 2023 10:55:10 AM CET    Success
Set log_archive_dest for Database        December 2, 2023 10:55:10 AM CET    December 2, 2023 10:55:12 AM CET    Success
Update System version                    December 2, 2023 10:55:12 AM CET    December 2, 2023 10:55:12 AM CET    Success
Generating and saving BOM                December 2, 2023 10:55:12 AM CET    December 2, 2023 10:56:03 AM CET    Success
TDE parameter update                     December 2, 2023 10:56:03 AM CET    December 2, 2023 10:56:03 AM CET    Success

Then I’ve done the same tasks for the second DB home. Your databases should normally use these new DB homes:

odacli list-databases
ID                                       DB Name    DB Type  DB Version           CDB     Class    Edition  Shape    Storage  Status       DB Home ID
---------------------------------------- ---------- -------- -------------------- ------- -------- -------- -------- -------- ------------ ----------------------------------------
ffdfcee3-c646-43ee-925b-2ae6f339b0e4     VCSGU      SI       19.19.0.0.230418     false   OLTP     EE       odb10    ACFS     CONFIGURED   121f642f-2233-483d-9f39-57450fd9ddd9
cf99a1b1-4c9c-4431-b7b7-e906c4be0fb6     VCSW       SI       19.19.0.0.230418     false   OLTP     EE       odb6     ACFS     CONFIGURED   c069c4f2-4add-4670-a103-d29fd0bac832

Removing old DB homes

Now you can safely remove the 19.17 DB homes:

odacli list-dbhomes
ID                                       Name                 DB Version                               DB Edition Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- ---------- --------------------------------------------- ----------
896ce25f-c05f-4765-986b-db807a26e150     OraDB19000_home6     19.17.0.0.221018                         EE         /u01/app/odaorahome/oracle/product/19.0.0     CONFIGURED                                                                                                             .0/dbhome_6                  
2caf70b0-8af1-4b17-8410-00de77f0949d     OraDB19000_home7     19.17.0.0.221018                         EE         /u01/app/odaorahome/oracle/product/19.0.0     CONFIGURED                                                                                                             .0/dbhome_7                  
 
c069c4f2-4add-4670-a103-d29fd0bac832     OraDB19000_home8     19.19.0.0.230418                         EE         /u01/app/odaorahome/oracle/product/19.0.0     CONFIGURED
                                                                                                                  .0/dbhome_8                  
121f642f-2233-483d-9f39-57450fd9ddd9     OraDB19000_home9     19.19.0.0.230418                         EE         /u01/app/odaorahome/oracle/product/19.0.0     CONFIGURED


odacli delete-dbhome -i 896ce25f-c05f-4765-986b-db807a26e150
odacli delete-dbhome -i 2caf70b0-8af1-4b17-8410-00de77f0949d

odacli list-dbhomes
ID                                       Name                 DB Version                               DB Edition Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- ---------- --------------------------------------------- ----------
c069c4f2-4add-4670-a103-d29fd0bac832     OraDB19000_home8     19.19.0.0.230418                         EE         /u01/app/odaorahome/oracle/product/19.0.0     CONFIGURED                                                                                                                .0/dbhome_8                  
121f642f-2233-483d-9f39-57450fd9ddd9     OraDB19000_home9     19.19.0.0.230418                         EE         /u01/app/odaorahome/oracle/product/19.0.0     CONFIGURED
 .0/dbhome_9                           

Conclusion

Is it better mixing versions or aligning system, storage and DB homes? Definitely, having a system using the highest possible version is more secure. And having databases’ patch level to something a little bit older is not a problem at all. But try keeping the gap as small as possible. I won’t recommend using 18c, 12c or 11gR2 with latest 19.20, as it’s not supported at all. If you need this kind of configuration, think about virtualizing your old databases as described here.