Applying WLS Patch Set Update 10.3.6.0.220118 on EBS R12.2

 

Apply WLS Patch Set Update 10.3.6.0.220118 on EBS R12.2

Environment : EBS R12.2

 

Download following patches

1. Patch 12426828 (SMARTUPDATE 3.3 INSTALLER PLACEHOLDER)
2. Patch 31136426 (SMART UPDATE TOOL ENHANCEMENT V4)

3. Patch 33528262_R12_GENERIC (EBS REHOSTED: 33494814 WLS PATCH SET UPDATE 10.3.6.0.220118)

First two patches Patch 12426828 and 31136426 is highly recommended to apply to speed bsu utility which is used to apply the patch.

Unzip p12426828_1035_Generic and apply

[appltest@testapp patch]$ java -jar patch-client-installer330_generic32.jar

- Select “Middleware Home” (/apdata/erp/fs2/FMW_Home) you would like Smart Update to be installed to

- Select “Typical Installation”

- Complete the installation

 

Now, Unzip p31136426_1036_Generic and copy it inside  $MW_HOME/utils/bsu directory

Copy following files

[appltest@testapp patch]$ unzip p31136426_1036_Generic

[appltest@testapp patch]$ cp -r bsu_update.sh bsu_update.bat bsu_update /apdata/erp/fs2/FMW_Home/utils/bsu

 

[appltest@testapp patch]$ cd /apdata/erp/fs2/FMW_Home/utils/bsu

Run bsu_update.sh to upgrade

[appltest@testapp bsu]$ ./bsu_update.sh install

 

Unzip p33528262_R12_GENERIC to receive p33494814_1036_Generic.zip

Now copy p33494814_1036_Generic.zip inside

/apdata/erp/fs2/FMW_Home/utils/bsu/cache_dir and unzip it

[appltest@testapp bsu]$ cp -r p33494814_1036_Generic.zip /apdata/erp/fs2/FMW_Home/utils/bsu/cache_dir

[appltest@testapp bsu]$ cd /apdata/erp/fs2/FMW_Home/utils/bsu/cache_dir

[appltest@testapp bsu]$ unzip p33494814_1036_Generic.zip

 

[appltest@testapp bsu]$ ./bsu.sh -install -patchlist=HYG5 -patch_download_dir=/apdata/erp/fs2/FMW_Home/utils/bsu/cache_dir -verbose -prod_dir=/apdata/erp/fs2/FMW_Home/wlserver_10.3

Checking for conflicts.......

Conflict(s) detected - resolve conflict condition and execute patch installation again

Conflict condition details follow:

Patch MXLE is mutually exclusive and cannot coexist with patch(es): K25M,KRDE,EQDE,YVDZ,QMJP,YHJK,Z9PC,XNBA,9KCT

 

As we can see, it reports conflicting patches which need to be removed first. These patches need to be removed in this order as they have internal dependencies.

[appltest@testapp bsu]$ ./bsu.sh -remove -patchlist=EQDE,Z9PC,KRDE,9KCT,QMJP -prod_dir=/apdata/erp/fs2/FMW_Home/wlserver_10.3

[appltest@testapp bsu]$ ./bsu.sh -remove -patchlist=K25M,YVDZ,YHJK,XNBA -prod_dir=/apdata/erp/fs2/FMW_Home/wlserver_10.3

 

Now retry to install the patch again

[appltest@testapp bsu]$ ./bsu.sh -install -patchlist=HYG5 -patch_download_dir=/apdata/erp/fs2/FMW_Home/utils/bsu/cache_dir -verbose -prod_dir=/apdata/erp/fs2/FMW_Home/wlserver_10.3

 

This time the patch was installed successfully.

Datapatch Failed After applying Oracle 19c PSU Apr 2025? How Disabling WMSYS Triggers Saved the Day

 

Recently we faced one issue while applying DB PSU Apr 2025 patch on oracle database 19c.

The error was like below.

 

$ ./datapatch -verbose

/u01/oracle/cfgtoollogs/sqlpatch/37642901/27123174/37642901_apply_NONPROD_2025May17_03_54_30.log (errors)

  -> Error at line 27817: script rdbms/admin/owmcvws.plb

      - ORA-04088: error during execution of trigger 'WMSYS.NO_VM_DDL'

      - ORA-00604: error occurred at recursive SQL level 2

      - ORA-04061: existing state of  has been invalidated

      - ORA-04061: existing state of package body "WMSYS.LT_CTX_PKG" has been

      - invalidated

      - ORA-04065: not executed, altered or dropped package body "WMSYS.LT_CTX_PKG"

      - ORA-06508: PL/SQL: could not find program unit being called: "WMSYS.LT_CTX_PKG"

      - ORA-06512: at "WMSYS.LTADM", line 9800

      - ORA-04061: existing state of package body "WMSYS.LT_CTX_PKG" has been

      - invalidated

      - ORA-04065: not executed, altered or dropped package body "WMSYS.LT_CTX_PKG"

      - ORA-06508: PL/SQL: could not find program unit being called: "WMSYS.LT_CTX_PKG"

      - ORA-06512: at "WMSYS.LTADM", line 9532

      - ORA-06512: at "WMSYS.OWM_DYNSQL_ACCESS", line 549

      - ORA-06512: at line 17

      - ORA-06512: at line 7

      - ORA-06512: at line 7

  -> Error at line 28420: script rdbms/admin/owmcvws.plb

      - ORA-04088: error during execution of trigger 'WMSYS.NO_VM_DDL'

      - ORA-00604: error occurred at recursive SQL level 1

      - ORA-04068: existing state of packages has been discarded

      - ORA-04061: existing state of package body "WMSYS.LTUTIL" has been invalidated

      - ORA-04065: not executed, altered or dropped package body "WMSYS.LTUTIL"

      - ORA-06508: PL/SQL: could not find program unit being called: "WMSYS.LTUTIL"

      - ORA-06512: at "WMSYS.LTADM", line 9437

      - ORA-06512: at "WMSYS.OWM_DYNSQL_ACCESS", line 544

      - ORA-06512: at line 15

Please refer to MOS Note 1609718.1 and/or the invocation log

/u01/oracle/cfgtoollogs/sqlpatch/sqlpatch_30994_2025_05_17_03_52_45/sqlpatch_invocation.log

for information on how to resolve the above errors.

 

SQL Patching tool complete on Sat May 17 03:55:35 2025

Solution:-

To resolve the issue we did following

Step 1: Disable WMSYS Triggers

Run this as SYS:

SQL> BEGIN

  EXECUTE IMMEDIATE 'ALTER TRIGGER WMSYS.NO_VM_DDL DISABLE';

  EXECUTE IMMEDIATE 'ALTER TRIGGER WMSYS.REFRESH_ON_ALTER DISABLE';

  EXECUTE IMMEDIATE 'ALTER TRIGGER WMSYS.ADD_OBJ_TRIGGER DISABLE';

EXCEPTION

  WHEN OTHERS THEN

    DBMS_OUTPUT.put_line(SQLERRM);

END;

/

 

 

Step 2: Recompile WMSYS Schema

SQL> BEGIN

  DBMS_UTILITY.compile_schema(schema => 'WMSYS', compile_all => TRUE);

END;

/

 

Step 3: Rerun datapatch

 

cd $ORACLE_HOME/OPatch

./datapatch -verbose

 

This time we didn’t face the error as mentioned above. So disable the triggers mentioned above fixed the issue.

 

Step 4: Re-enable the Triggers

SQL>BEGIN

  EXECUTE IMMEDIATE 'ALTER TRIGGER WMSYS.NO_VM_DDL ENABLE';

  EXECUTE IMMEDIATE 'ALTER TRIGGER WMSYS.REFRESH_ON_ALTER ENABLE';

  EXECUTE IMMEDIATE 'ALTER TRIGGER WMSYS.ADD_OBJ_TRIGGER ENABLE';

EXCEPTION

  WHEN OTHERS THEN

    DBMS_OUTPUT.put_line(SQLERRM);

END;

/

 

 

Now when we checked dba_registry_sqlpatch we could see the patch application was successful.



LsInventorySession failed: Oracle Home inventory cannot be loaded.

Error:-

LsInventorySession failed: Oracle Home inventory cannot be loaded.

 

Recently , while trying to get output from opatch lsinventory we faced following error.

[oratest@non-prod-db OPatch]$ ./opatch lsinventory

Oracle Interim Patch Installer version 12.1.0.1.10

Copyright (c) 2025, Oracle Corporation.  All rights reserved.

 

 

Oracle Home       : /dbtest/dbdata/erp/12.1.0

Central Inventory : /dbtest/dbdata/oraInventory

   from           : /dbtest/dbdata/erp/12.1.0/oraInst.loc

OPatch version    : 12.1.0.1.10

OUI version       : 12.1.0.2.0

Log file location : /dbtest/dbdata/erp/12.1.0/cfgtoollogs/opatch/opatch2025-05-14_14-03-27PM_1.log

 

List of Homes on this system:

 

Inventory load failed... OPatch cannot load inventory for the given Oracle Home.

Possible causes are:

   Oracle Home dir. path does not exist in Central Inventory

   Oracle Home is a symbolic link

   Oracle Home inventory is corrupted

LsInventorySession failed: Oracle Home inventory cannot be loaded.

 

OPatch failed with error code 73

 

The Common Causes of above issues are

  1. Oracle Home is not registered in the Central Inventory
  2. Corrupt or missing inventory.xml
  3. Oracle Home is a symbolic link
  4. File permissions issues
  5. Incorrect oraInst.loc path or content

 

 

 

 

Verify oraInst.loc

Check the content of the file:

[oratest@non-prod-db OPatch]$ cat /dbtest/dbdata/erp/12.1.0/oraInst.loc

inventory_loc=/dbtest/dbdata/oraInventory

inst_group=oinstall

 

So the content of oraInst.loc looks fine and pointing to correct Central Inventory directory which actually exists and accessible.

 

Check for the Inventory File

[oratest@non-prod-db OPatch]$ ls -l /dbtest/dbdata/oraInventory/ContentsXML/inventory.xml

ls: cannot access /dbtest/dbdata/oraInventory/ContentsXML/inventory.xml: No such file or directory

 

So while checking the inventory.xml we found that the file is missing. which confirms the central inventory is broken or uninitialized, which is why opatch lsinventory is failing.

 

We will need to re-register Oracle Home with the central inventory using the runInstaller tool.

·         Backup Inventory Directory (Optional but Recommended)

$mv /dbtest/dbdata/oraInventory /dbtest/dbdata/oraInventory_backup_$(date +%Y%m%d)

 

·         Create a Fresh Inventory Directory:-

mkdir -p /dbtest/dbdata/oraInventory/ContentsXML

chown -R oratest:oinstall /dbtest/dbdata/oraInventory

chmod -R 775 /dbtest/dbdata/oraInventory

 

·         Re-register the Oracle Home

[oratest@non-prod-db OPatch]$ /dbtest/dbdata/erp/12.1.0/oui/bin/runInstaller -silent -attachHome ORACLE_HOME="/dbtest/dbdata/erp/12.1.0" ORACLE_HOME_NAME="OraHome1"

Starting Oracle Universal Installer...

 

Checking swap space: must be greater than 500 MB.   Actual 32700 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

'AttachHome' was successful.

 

Now , lets try opatch lsinventory

[oratest@non-prod-db OPatch]$ ./opatch lsinventory

Oracle Interim Patch Installer version 12.1.0.1.10

Copyright (c) 2025, Oracle Corporation.  All rights reserved.

 

Oracle Home       : /dbtest/dbdata/erp/12.1.0

Central Inventory : /dbtest/dbdata/oraInventory

   from           : /dbtest/dbdata/erp/12.1.0/oraInst.loc

OPatch version    : 12.1.0.1.10

OUI version       : 12.1.0.2.0

Log file location : /dbtest/dbdata/erp/12.1.0/cfgtoollogs/opatch/opatch2025-05-14_14-08-28PM_1.log

 

Lsinventory Output file location : /dbtest/dbdata/erp/12.1.0/cfgtoollogs/opatch/lsinv/lsinventory2025-05-14_14-08-28PM.txt

 

--------------------------------------------------------------------------------

Local Machine Information::

Hostname: non-prod-db.com

ARU platform id: 226

ARU platform description:: Linux x86-64

 Installed Top-level Products (2):

 

Oracle Database 12c                                                  12.1.0.2.0

Oracle Database 12c Examples                                         12.1.0.2.0

There are 2 products installed in this Oracle Home.

 

 Interim patches (35) :

 

Patch  25305405     : applied on Tue Feb 13 16:12:11 IST 2018

Unique Patch ID:  21701443

   Created on 9 Nov 2017, 03:39:35 hrs PST8PDT

   Bugs fixed:

     25305405

 

Patch  25906117     : applied on Tue Feb 13 16:05:01 IST 2018

Unique Patch ID:  21296770

   Created on 26 May 2017, 03:18:37 hrs PST8PDT

   Bugs fixed:

     25906117

 

--------------------------------------------------------------------------------

 

OPatch succeeded.

 

So, this is how issue was resolved.


RMAN Configuration Demystified: A Practical Deep Dive for DBAs – Part 3

RMAN Configuration Demystified: A Practical Deep Dive for DBAs – Part 3

LIST Commands:-

Command

Description

LIST BACKUP OF DATABASE;

Lists all backup sets (full, incremental, archivelogs) related to the entire database.

LIST COPY OF DATAFILE 1, 2;

Lists image copies of datafiles 1 and 2. These are exact file copies, not in backup set format.

LIST BACKUP OF ARCHIVELOG FROM SEQUENCE 10;

Shows archive log backups starting from sequence 10 onward.

LIST BACKUPSET OF DATAFILE 1;

Lists backup sets that include datafile 1.

LIST BACKUP;

Shows all backup sets and image copies in the RMAN catalog/control file.

LIST COPY;

Lists all image copies (of datafiles, control files, etc.).

LIST ARCHIVELOG ALL;

Lists all archived redo logs known to RMAN (including backed-up or not).

LIST RESTORE POINT <Restore_point_name>;

Lists a specific restore points details. Useful for point-in-time recovery.

LIST RESTORE POINT ALL;

Lists all restore points in database.

LIST EXPIRED BACKUP;

Lists expired backups (files not found on disk, marked expired by RMAN).

LIST BACKUP SUMMARY;

Provides a summary view (high-level) of backup sets — size, date, device type, etc.

LIST BACKUPSET TAG 'weekly_full_db_backup';

Lists backup sets with a specific tag (e.g., full weekly backups).

LIST BACKUPSET 213;

Displays information about backupset with ID 213.

LIST COPY OF DATAFILE 2 COMPLETED BETWEEN '10-DEC-2024' AND '17-DEC-2024';

Shows image copies of datafile 2 completed within a date range.

LIST BACKUP OF DATAFILE 1;

Lists backups that include only datafile 1.




REPORT Commands:-

Command

Description

REPORT OBSOLETE;

Lists backups that are no longer needed according to current retention policy (can be deleted).

REPORT SCHEMA;

Displays the current database schema as seen by RMAN (tablespaces, datafiles).

REPORT NEED BACKUP;

Shows files that need a backup based on the retention policy.

REPORT NEED BACKUP RECOVERY WINDOW OF 2 DAYS DATABASE DEVICE TYPE SBT;

Reports files that need a backup to satisfy a 2-day recovery window for tape.

REPORT NEED BACKUP DEVICE TYPE DISK;

Same as above, but for disk-based backups.

REPORT NEED BACKUP TABLESPACE USERS DEVICE TYPE SBT;

Shows if tablespace USERS needs backup on tape.

REPORT OBSOLETE RECOVERY WINDOW OF 3 DAYS;

Lists backups that fall outside a 3-day recovery window — can be purged.

REPORT OBSOLETE REDUNDANCY 1;

Lists backups that exceed a redundancy of 1 copy, meaning you can safely delete extras.


CROSSCHECK Commands:-

Command

Description

CROSSCHECK BACKUP DEVICE TYPE DISK;

Checks all disk-based backups to ensure the files still exist on disk.

CROSSCHECK BACKUP DEVICE TYPE SBT;

Checks tape-based (SBT) backups for availability.

CROSSCHECK BACKUP;

Validates all backups: backup sets, image copies, proxy copies — regardless of device type.

CROSSCHECK COPY OF DATABASE;

Validates all image copies of the entire database (datafiles, controlfiles, etc.).

CROSSCHECK BACKUPSET 1338, 1339, 1340;

Checks specific backup sets by ID numbers.

CROSSCHECK BACKUPPIECE TAG nightly_backup;

Checks all backup pieces that were tagged with nightly_backup.

CROSSCHECK BACKUP OF ARCHIVELOG ALL SPFILE;

Verifies backups of all archivelogs and SPFILEs.

CROSSCHECK CONTROLFILECOPY '/tmp/control01.ctl';

Checks the availability of a control file copy at a specific location.



DELETE Commands:-

Command

Description

DELETE BACKUPPIECE 101;

Deletes the specific backup piece with ID 101 from disk or tape.

DELETE CONTROLFILECOPY '/tmp/control01.ctl';

Deletes a control file copy located at /tmp/control01.ctl.

DELETE NOPROMPT ARCHIVELOG UNTIL SEQUENCE 300;

Deletes all archived redo logs up to sequence 299, without prompting for confirmation. Useful for space management.

DELETE BACKUP TAG 'before_upgrade';

Deletes all backups (sets or copies) with the tag before_upgrade. Helpful in identifying backups made for specific events.

DELETE ARCHIVELOG ALL BACKED UP 3 TIMES TO SBT;

Deletes all archived logs that have been successfully backed up 3 times to tape (SBT). Ensures recoverability is retained before deletion.

DELETE EXPIRED BACKUP;

Deletes all expired backups (files that were marked as EXPIRED after a CROSSCHECK operation).

DELETE OBSOLETE;

Deletes all backups (datafile, archivelog, controlfile, etc.) no longer needed according to the configured retention policy (either redundancy or recovery window).