Apply Latest Oracle 19c Database Patch on AIX: Step by Step

Apply Oracle 19c Patch on AIX: Keeping Oracle Database current with the latest Release Update (RU) is the most important step in securing and stabilising a production system. In this guide you’ll learn how to apply the latest Oracle 19c database patch on AIX, from downloading the patch to running datapatch and verifying the result, with a rollback plan and fixes for common errors.

Steps to Apply Oracle 19c Patch on AIX

1. What you need before patching

  • Oracle 19c single-instance home installed on AIX (see my Oracle 19c installation on AIX guide)
  • OS user oracle with environment variables set (ORACLE_HOME, ORACLE_SID, PATH)
  • Access to My Oracle Support (MOS)
  • At least 2 to 3 GB free in /tmp and in the staging directory
  • A maintenance window (the database must be down while applying the patch to the home)

Set your environment:

bash

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

2. Find and download the latest Oracle 19c patch

  1. Log in to My Oracle Support.
  2. Open the Oracle Database 19c Release Update patch list note (search MOS for “Oracle Database 19c Release Updates and Revisions” or the quarterly “Critical Patch Update” advisory). Oracle publishes new RUs every quarter (January, April, July, October).
  3. Choose the Database Release Update for IBM AIX on POWER Systems (64-bit).
  4. Download the patch zip and the latest OPatch (patch 6880880) for 19c on AIX.
  5. Read the patch README.html fully. It lists the required OPatch version and any prerequisites.

Copy the files to the server, for example /stage/patches:

bash

ls -l /stage/patches
unzip -q p<patch_number>_190000_AIX64-5L.zip -d /stage/patches

3. Back up the Oracle home and database

Never patch without a fallback.

bash

# Oracle home backup (database and listener stopped, or at least quiesced)
cd /u01/app/oracle/product/19.0.0
tar -cvf /backup/dbhome_1_pre_patch.tar dbhome_1

# Inventory backup
tar -cvf /backup/oraInventory_pre_patch.tar /u01/app/oraInventory

Take an RMAN backup of the database as well:

bash

rman target /
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

4. Update OPatch

bash

cd $ORACLE_HOME
mv OPatch OPatch_old_$(date +%Y%m%d)
unzip -q /stage/patches/p6880880_190000_AIX64-5L.zip -d $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch version

Compare the version with the minimum required in the patch README.

5. Run prechecks

Check the current inventory and any conflicts:

bash

$ORACLE_HOME/OPatch/opatch lsinventory
cd /stage/patches/<patch_number>
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Resolve any conflicts before moving on. Oracle Support can supply merge patches where needed.

6. Stop the database and listener

bash

lsnrctl stop
sqlplus / as sysdba
SQL> shutdown immediate;
SQL> exit

Confirm nothing from this home is still running:

bash

ps -ef | grep -E "pmon|tnslsnr|ora_" | grep -v grep

7. Run slibclean (AIX specific)

AIX keeps shared libraries in memory, which can cause “text file busy” or library-in-use errors during patching. Run this as root:

bash

/usr/sbin/slibclean

8. Apply the patch with OPatch

bash

cd /stage/patches/<patch_number>
$ORACLE_HOME/OPatch/opatch apply

Answer the prompts, and wait for “OPatch succeeded.” The log is in $ORACLE_HOME/cfgtoollogs/opatch/.

9. Start the database and run datapatch

bash

lsnrctl start
sqlplus / as sysdba
SQL> startup;
SQL> alter pluggable database all open;
SQL> exit

cd $ORACLE_HOME/OPatch
./datapatch -verbose

If you use a multitenant database, datapatch patches the CDB and all open PDBs. Check that every PDB is open first.

10. Verify the patch

bash

$ORACLE_HOME/OPatch/opatch lsinventory | grep -i "applied"
$ORACLE_HOME/OPatch/opatch lspatches

sql

SET LINES 200 PAGES 100
COL description FORMAT a60
SELECT patch_id, action, status, description, action_time
FROM   dba_registry_sqlpatch
ORDER  BY action_time DESC;

The latest entry should show STATUS = SUCCESS. Recompile invalid objects if needed:

sql

@?/rdbms/admin/utlrp.sql
SELECT COUNT(*) FROM dba_objects WHERE status='INVALID';

11. Roll back a patch

If you need to go back:

bash

# database and listener down, slibclean run as root
$ORACLE_HOME/OPatch/opatch rollback -id <patch_number>

# then start the database and run
$ORACLE_HOME/OPatch/datapatch -verbose

12. Common errors and fixes

ErrorCauseFix
Text file busy / library in useShared libraries still loaded on AIXStop all Oracle processes and run slibclean as root
OPatch version is lower than requiredOld OPatchInstall the latest patch 6880880
Prerequisite check CheckConflictAgainstOHWithDetail failedConflicting one-off patchRoll back the conflicting patch or request a merge patch
Unable to create patch objectWrong permissions, or wrong Oracle homeCheck the owner is oracle and $ORACLE_HOME is correct
datapatch skips a PDBPDB was not openOpen all PDBs and re-run datapatch -verbose
Not enough spaceLow /tmp or home filesystemFree space, or set a different TMPDIR

13. FAQ

How often should I patch Oracle 19c?

Oracle releases a Release Update every quarter. Many organisations patch at least twice a year, and sooner for critical security fixes.

Do I need to run slibclean on AIX every time?

Yes, before applying or rolling back a patch, since AIX caches shared libraries in memory.

What is the difference between a Release Update and a Release Update Revision?

An RU is the main quarterly patch bundle with security and functional fixes. A Revision (RUR) was a smaller, security and regression-focused follow-up on an older RU. Check MOS for the current patching policy, as it has changed over time.

Is datapatch required after opatch apply?

Yes. opatch apply updates the binaries, and datapatch applies the SQL changes inside the database.

Can I patch with zero downtime?

Not with standard opatch apply on a single instance. Options include Oracle RAC rolling patching or Data Guard standby-first patching.

How do I check which patch is installed?

Use opatch lspatches and query dba_registry_sqlpatch.

Conclusion

Applying the latest Oracle 19c patch on AIX comes down to a clear sequence: back up, update OPatch, run prechecks, stop services, run slibclean, opatch apply, then datapatch. Always read the README for your specific RU. If you hit an error, leave a comment with the exact message and I’ll help.

1 thought on “Apply Latest Oracle 19c Database Patch on AIX: Step by Step”

Leave a Comment