Wednesday, August 30, 2017

Error at line 536: ORA-04021: timeout occurred while waiting to lock object while executing datapatch for PSU

Error at line 536: ORA-04021: timeout occurred while waiting to lock object while executing datapatch for PSU


Getting below error while executing below error for database PSU ( datapatch )

 Error at line 536: ORA-04021: timeout occurred while waiting to lock object

================================
./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Tue Aug 29 14:55:58 2017
Copyright (c) 2012, 2016, Oracle.  All rights reserved.

Log file for this invocation: ......

Connecting to database...OK
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Patch 20204035 ():
  Installed in the binary registry and the SQL registry
Patch 22139226 (Database PSU 12.1.0.2.160119, Oracle JavaVM Component (Jan2016)):
  Not installed in the binary or the SQL registry
Patch 24315824 (Database PSU 12.1.0.2.161018, Oracle JavaVM Component (OCT2016)):
  Installed in the binary registry and the SQL registry
Bundle series PSU:
  ID 170718 in the binary registry and ID 161018 in the SQL registry

Adding patches to installation queue and performing prereq checks...
Installation queue:
  Nothing to roll back
  The following patches will be applied:
    25755742 (DATABASE PATCH SET UPDATE 12.1.0.2.170718)

Installing patches...
Patch installation complete.  Total patches installed: 1

Validating logfiles...
Patch 25755742 apply: WITH ERRORS
  logfile: ....._....log (errors)
    Error at line 536: ORA-04021: timeout occurred while waiting to lock object
=============================================

Log file details 

===================================
Session altered.


Library created.

CREATE OR REPLACE PACKAGE BODY dbms_audit_mgmt wrapped
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock objectPackage body created.


Grant succeeded.
==================================================

Resolution:
 Some session might be locking this object. Below are the solutions for this problem.
1. Search the session blocking the object and kill it if possible.
2. Shutdown the database and do a startup restrict

No comments:

Post a Comment

Command to do active duplicate for Oracle Database

1. First login to target server 2. Validate tns connectivity between Source DB and Target DB 3. Prepare and validate space availability 4. S...