My Oracle Support Banner

Datapatch slow/stuck at "Gathering database info" and "Installing Patches" without returning OS prompt / Status (Doc ID 2978448.1)

Last updated on NOVEMBER 26, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 19.3.0.0.0 and later
Information in this document applies to any platform.

Symptoms

Datapatch is very slow at the following phase -

[2023-09-02 15:51:11] Connecting to database...[2023-09-02 15:51:11] OK
[2023-09-02 15:51:11] Gathering database info.....

Next hang is seen after Installing Patches -

./datapatch -verbose
SQL Patching tool version 19.19.0.0.0 Production on Sun Sep  3 02:03:36 2023
Copyright (c) 2012, 2023, Oracle.  All rights reserved.

Log file for this invocation: /opt/oracle/cfgtoollogs/sqlpatch/sqlpatch_28568_2023_09_03_02_03_36/sqlpatch_invocation.log

Connecting to database...OK
Gathering database info...






done
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of interim SQL patches:
Interim patch 32399816 (OJVM RELEASE UPDATE: 19.11.0.0.210420 (32399816)):
 Binary registry: Not installed
 SQL registry: Rolled back successfully on 29-MAY-22 12.58.14.742912 AM
Interim patch 33561310 (OJVM RELEASE UPDATE: 19.14.0.0.220118 (33561310)):
 Binary registry: Not installed
 SQL registry: Rolled back successfully on 14-AUG-22 02.00.10.765494 AM
Interim patch 33808367 (OJVM RELEASE UPDATE: 19.15.0.0.220419 (33808367)):
 Binary registry: Not installed
 SQL registry: Rolled back successfully on 27-NOV-22 03.49.00.114651 AM
Interim patch 34086870 (OJVM RELEASE UPDATE: 19.16.0.0.220719 (34086870)):
 Binary registry: Not installed
 SQL registry: Rolled back successfully on 08-APR-23 10.30.09.634581 AM
Interim patch 34411846 (OJVM RELEASE UPDATE: 19.17.0.0.221018 (34411846)):
 Binary registry: Not installed
 SQL registry: Rolled back successfully on 17-JUN-23 09.57.51.618589 AM
Interim patch 34786990 (OJVM RELEASE UPDATE: 19.18.0.0.230117 (34786990)):
 Binary registry: Not installed
 SQL registry: Applied successfully on 17-JUN-23 09.57.58.095680 AM
Interim patch 35050341 (OJVM RELEASE UPDATE: 19.19.0.0.230418 (35050341)):
 Binary registry: Installed
 SQL registry: Not installed

Current state of release update SQL patches:
 Binary registry:
   19.19.0.0.0 Release_Update 230328053339: Installed
 SQL registry:
   Applied 19.18.0.0.0 Release_Update 230129234857 successfully on 17-JUN-23 09.57.58.075000 AM

Adding patches to installation queue and performing prereq checks...done
Installation queue:
 The following interim patches will be rolled back:
   34786990 (OJVM RELEASE UPDATE: 19.18.0.0.230117 (34786990))
 Patch 35042068 (Database Release Update : 19.19.0.0.230418 (35042068)):
   Apply from 19.18.0.0.0 Release_Update 230129234857 to 19.19.0.0.0 Release_Update 230328053339
 The following interim patches will be applied:
   35050341 (OJVM RELEASE UPDATE: 19.19.0.0.230418 (35050341))

Installing patches...

Another Execution will not succeed as earlier Datapatch Session have still placed an Exclusive Lock on Key Datapatch Metadata Tables-

[2023-09-03 01:09:38] Connecting to database...[2023-09-03 01:09:38] OK
[2023-09-03 01:09:38] Gathering database info...[2023-09-03 01:09:39] Unable to acquire sqlpatch global lock in EXCLUSIVE mode
[2023-09-03 01:09:39] because another datapatch session is currently running.
[2023-09-03 01:09:39] Waiting for that session to complete before continuing...
[2023-09-03 01:10:06] Error: prereq checks failed!
[2023-09-03 01:10:06] DBD::Oracle::st execute failed: ORA-01013: user requested cancel of current operation
ORA-06512: at "SYS.DBMS_LOCK", line 92
ORA-06512: at "SYS.DBMS_LOCK", line 108
ORA-06512: at line 9 (DBD ERROR: OCIStmtExecute) [for Statement "DECLARE
          lockmode INTEGER;
        BEGIN
          IF ? = 'SHARED' THEN
            lockmode := dbms_lock.s_mode;
          ELSE
            lockmode := dbms_lock.x_mode;
          END IF;
          ? := dbms_lock.request(?, lockmode, dbms_lock.maxwait, false);
        END;" with ParamValues: :p1='EXCLUSIVE', :p2='1', :p3='10737484981073748498129'] at /opt/oracle/19.11.0/sqlpatch/sqlpatch.pm line 2017.

[2023-09-03 01:10:06]
Please refer to MOS Note 1609718.1 and/or the invocation log



Changes

 Checking sqlpatch_invocation log, reveals multiple processes connecting to SQLPLUS Session to collect Instance and Patching Metadata.

However, Only 1 Session gets a lock and it's execution is also stalled/delayed , while the others wait-

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.