Step 4 - Patch a Database: Update a Database to point to a New Database Home
Because we may not want to patch all databases at once, we must first identify which database home corresponds to which database.
To use the BUI to identify the database homes, go to the Database tab.
Click on the database name, for example, db4
to identify the database home ID for patching.
Note the Database home ID, or the Database home location. You will need this to patch the database by pointing it to a home.
You can use either the command odacli update-dbhome
or the BUI to update the database homes, and thus the databases, running on the appliance. Each home is updated independently, giving you control over when you patch your databases.
Now, we will use the CLI to patch database db4
.
The odacli list-databases
command displays details about each database, its ID and its database home ID. Those database homes will be the ones we will patch by supplying the database home ID to the patching command. You can also see more information, such as the name of the database home, using the odacli list-dbhomes
command.
$ odacli list-databases
ID DB Name DB Type DB Version CDB Class Shape Storage Status DbHomeID
---------------------------------------- ---------- -------- -------------------- ---------- -------- -------- ---------- ------------ ----------------------------------------
324a42ea-bba2-477d-8bca-5a26af159f1c db3 SI 19.13.0.0.211019 false OLTP odb1 ASM CONFIGURED ecfa440e-2482-40c1-8ccd-67316cd48ba2
deac01db-eaa8-4f4e-a511-aea042be3a18 db4 SI 19.13.0.0.211019 false OLTP odb1 ASM CONFIGURED c3c63738-703e-4c1d-98de-95b551b67468
$ odacli list-dbhomes
ID Name DB Version Home Location Status
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
a1314be1-2c6f-411f-b2c7-61444449f02b OraDB19000_home2 19.13.0.0.211019 /u01/app/odaorahomebase/odaadmin/product/19.0.0.0/dbhome_2 CONFIGURED
ecfa440e-2482-40c1-8ccd-67316cd48ba2 OraDB19000_home3 19.13.0.0.211019 /u01/app/odaorahomebase/odaadmin/product/19.0.0.0/dbhome_3 CONFIGURED
c3c63738-703e-4c1d-98de-95b551b67468 OraDB19000_home4 19.13.0.0.211019 /u01/app/odaorahomebase/odaadmin/product/19.0.0.0/dbhome_4 CONFIGURED
Use the clipboard to copy the DB home ID for db4
. Then use the DB home ID with the odacli update-dbhome
command to update the home for db4
. Verify that the job has completed successfully using the command odacli describe-job
.
$ odacli update-dbhome -i c3c63738-703e-4c1d-98de-95b551b67468 -v 19.14.0.0.0
{
"jobId" : "af879f3e-9c50-4dfd-86db-5d380a42f8d2",
"status" : "Created",
"message" : null,
"reports" : [ ],
"createTimestamp" : "February 26, 2022 06:59:59 AM UTC",
"resourceList" : [ ],
"description" : "DB Home Patching: Home Id is c3c63738-703e-4c1d-98de-95b551b67468",
"updatedTime" : "February 26, 2022 06:59:59 AM UTC"
}
$ odacli describe-job -i af879f3e-9c50-4dfd-86db-5d380a42f8d2
Job details
----------------------------------------------------------------
ID: af879f3e-9c50-4dfd-86db-5d380a42f8d2
Description: DB Home Patching: Home Id is c3c63738-703e-4c1d-98de-95b551b67468
Status: Success
Created: February 26, 2022 6:59:59 AM UTC
Message:
Task Name Start Time End Time Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Adding USER SSH_EQUIVALENCE February 26, 2022 7:00:02 AM UTC February 26, 2022 7:00:02 AM UTC Success
Adding USER SSH_EQUIVALENCE February 26, 2022 7:00:02 AM UTC February 26, 2022 7:00:02 AM UTC Success
Verify that database home db4
is updated to the release 19.14. You can use either the BUI or CLI for verification.
# odacli list-dbhomes
ID Name DB Version Home Location Status
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
a1314be1-2c6f-411f-b2c7-61444449f02b OraDB19000_home2 19.13.0.0.211019 /u01/app/odaorahomebase/odaadmin/product/19.0.0.0/dbhome_2 CONFIGURED
ecfa440e-2482-40c1-8ccd-67316cd48ba2 OraDB19000_home3 19.13.0.0.211019 /u01/app/odaorahomebase/odaadmin/product/19.0.0.0/dbhome_3 CONFIGURED
c3c63738-703e-4c1d-98de-95b551b67468 OraDB19000_home4 19.14.0.0.220118 /u01/app/odaorahomebase/odaadmin/product/19.0.0.0/dbhome_4 CONFIGURED
You can also use the GUI web console to update the database homes by clicking Patch on the left panel, and then select Apply in the Patch drop-down. We have already updated the db4
database by pointing to a new home using the command line already.