PSU (RU) patching : Does datapatch execution for a single tenant configuration take 30 minutes ? — oracle-tech

    Forum Stats

  • 3,701,027 Users
  • 2,239,262 Discussions
  • 7,834,978 Comments

Discussions

PSU (RU) patching : Does datapatch execution for a single tenant configuration take 30 minutes ?

Y.RamletY.Ramlet Posts: 248 Bronze Badge
edited October 8 in Database Upgrade

DB Version : 19c

OS : Oracle Linux 8.2

Patch being applied: 31326362(July 2020 Release Update)


I was applying July 2020 Release update (PSU) for 19c DB in the non-production environment.

In the non-prod environment, I have only 1 PDB (along with CDB and PDB$SEED). And this PDB has very less business data in it.


The opatch apply took nearly 7 minutes. But, the datapatch took 30 minutes to complete running the script in PDB, CDB and PDB$SEED (10 minutes for each DB). Is this normal ? Because, in production environment, I have 7 PDBs. So, does this mean it will take 70 minutes to complete the datapatch script execution. If I am not mistaken, datapatch just executes catbundle.sql internally.


datapatch execution log posted below:

--- Please forgive lack of formatting the below output to a monospace font (like courier). When I select multiples lines (to change the font), that small box with {..} does not appear. It appears only for 1 line ! So, I need to formatting for each line !!

[[email protected] OPatch]$ ./datapatch -verbose

SQL Patching tool version 19.8.0.0.0 Production on Wed Oct 7 18:45:12 2020

Copyright (c) 2012, 2020, Oracle. All rights reserved.


Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_16269_2020_10_07_18_45_12/sqlpatch_invocation.log


Connecting to database...OK

Gathering database info...done


Note: Datapatch will only apply or rollback SQL fixes for PDBs

    that are in an open state, no patches will be applied to closed PDBs.

    Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation

    (Doc ID 1585822.1)


Bootstrapping registry and package to current versions...done

Determining current state...done


Current state of interim SQL patches:

No interim patches found


Current state of release update SQL patches:

Binary registry:

 19.8.0.0.0 Release_Update 200703031501: Installed

PDB CDB$ROOT:

 Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 15-OCT-19 05.52.08.222964 PM

PDB WMBSPDB:

 Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 15-OCT-19 06.06.54.494545 PM

PDB PDB$SEED:

 Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 15-OCT-19 06.06.54.494545 PM


Adding patches to installation queue and performing prereq checks...done

Installation queue:

For the following PDBs: CDB$ROOT PDB$SEED WMBSPDB

 No interim patches need to be rolled back

 Patch 31281355 (Database Release Update : 19.8.0.0.200714 (31281355)):

   Apply from 19.3.0.0.0 Release_Update 190410122720 to 19.8.0.0.0 Release_Update 200703031501

 No interim patches need to be applied


Installing patches...


Patch installation complete. Total patches installed: 3


Validating logfiles...done

Patch 31281355 apply (pdb CDB$ROOT): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/31281355/23688465/31281355_apply_FRMCDB23_CDBROOT_2020Oct07_18_46_43.log (no errors)

Patch 31281355 apply (pdb PDB$SEED): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/31281355/23688465/31281355_apply_FRMCDB23_PDBSEED_2020Oct07_19_00_08.log (no errors)

Patch 31281355 apply (pdb WMBSPDB): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/31281355/23688465/31281355_apply_FRMCDB23_WMBSPDB_2020Oct07_19_00_07.log (no errors)

SQL Patching tool complete on Wed Oct 7 19:15:13 2020

[[email protected] OPatch]$

Answers

  • Piyush PrakashPiyush Prakash Posts: 12 Red Ribbon

    ./datapatch -verbose once took 2 hours to complete. It depends upon many thinsgs:

    1. Number of patches need to be applied
    2. Table Analyze takes time
    3. Any table permission issue or object access issue,
    4. Check the alert logs
    5. Check the datapatch logs as well
    6. Donot cancel in between


    Thanks

    Piyush

    Y.Ramlet
  • Miguel PalaciosMiguel Palacios Posts: 191 Bronze Badge

    Hi

    If you are not patching OJVM you are able to run datapatch in read write mode (when database is open)

    You could try datapatch -prereq to do a precheck only and see if you need upgrade mode.

    In my experience i have seen datapatch runs between 5 minutes and 90 minutes or more

    You can take a look into log file sqlpatch_catcon_0.log or similar and search for inserts or updates

    Maybe you could help Oracle gathering statistics using

    EXEC DBMS_STATS.gather_table_stats('SCHEMA', 'TABLE_NAME');

Sign In or Register to comment.