Ora-04021 timeout occurred while waiting to lock object

Hai All
When adding a column into a table then an error comes error
Error Message:
ORA-04021: timeout occurred while waiting to lock object .....
How it happens ...what is the solution....please help
Shiju..

Hi
Identify the session that is using this object, kill it and then perform the ALTER table... or wait until the session that is accessing this table release it.
Rgds
Adnan

Similar Messages

  • Patch 9239090 - ORA-04021: timeout occurred while waiting to lock object

    Hello Guys,
    I need help urgently to comlete an upgrade of ebs 12.1.1 to 12.1.3.
    We are upgrading ebs 11i to 12i going live this weekend. We have encountered "ORA-04021: timeout occurred while waiting to lock object" on patch 9239090 with two Workers:
    In adctrl:
    1 Run AutoPatch R120 AFUTLGRS.pls FAILED
    2 Run AutoPatch R120 AFUTLOGS.pls FAILED
    sqlplus -s APPS/***** @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
    Connected.
    create or replace package wf_bes_cleanup AUTHID CURRENT_USER as
    ERROR at line 1:
    ORA-04021: timeout occurred while waiting to lock object
    I have done everything everything imaginable but cannot get pass these 2 failed workers.
    1) I have checked are there are no locks blocking on any objects:
    select s1.username || '@' || s1.machine
    || ' ( SID=' || s1.sid || ' ) is blocking '
    || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status
    from v$lock l1, v$session s1, v$lock l2, v$session s2
    where s1.sid=l1.sid and s2.sid=l2.sid
    and l1.BLOCK=1 and l2.request > 0
    and l1.id1 = l2.id1
    and l2.id2 = l2.id2 ;
    2) I also checked and there is space in the database.
    3) From adctrl, I have tried restarting the jobs one by one but the worker 1 hangs at and eventually fails on several (12) attempts.
    4) The solution on Doc ID 1291064.1 is not the problem:
    SQL> select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI, FORCE_LOGGING
    from v$database;
    SUPPLEME SUP SUP FOR
    NO NO NO NO
    5) Manual execution still gave ORA-04021:
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql
    6) The alert log has no related errors
    7) I Finally, after over 6 hours of waiting, I could only get the patch to continue after by using adctrl option 8 to skip these two workers.
    After proceeding, I have yet hit two more errors and now stuck:
    I have hit another error with the same patch:
    create or replace package body FND_LOG as
    /* $Header: AFUTLOGB.pls 120 ...
    AD Worker error:
    ORA-04021: timeout occurred while waiting to lock object
    Unable to process file in PACKAGE mode.
    Not converting file for Invoker's Rights because it appears to be a package body creation script (based on the filename).
    File is: /u02/applfinp/apps/apps_st/appl/fnd/12.0.0/patch/115/sql/AFUTLOGB.pls
    AD Worker warning:
    Product Data File
       /u02/applfinp/apps/apps_st/appl/admin/xniprod.txt
       does not exist for product "xni".
      This product is registered in the database but the above file does not exist in APPL_TOP.  The product will be ignored without error
    AD Worker error:
    The following ORACLE error:
    ORA-04063: package body "APPS.FND_LOG" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "APPS.FND_LOG"
    ORA-06512: at "APPS.FND_FUNCTION", line 834
    ORA-06512: at "APPS.FND_MENU_ENTRIES_C_DELTRG", line 4
    ORA-04088: error during execution of trigger 'APPS.FND_MENU_ENTRIES_C_DELTRG'
    Can I stop and restart this patch 9239090?

    Hello,
    I later executed the failed jobs or scripts manually (successfully) for the patch to continue
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql
    The patch ended with the following :
    The following Oracle Reports objects did not generate successfully:
    ap reports/US APXARATE.rdf
    ar reports/US ARXCTA.rdf
    fa reports/US FASRSVED.rdf
    ont reports/US OEXOEORD.rdf
    pa reports/US PAXACMPT.rdf
    pa reports/US PAXALRUN.rdf
    pa reports/US PAXACRPT.rdf
    pa reports/US PAXCPGAL.rdf
    pa reports/US PAXPCRFD.rdf
    The patch execution ended but the patch number is not record in apps.ad_bugs table:
    select TO_CHAR(CREATION_DATE,'dd-Mon-yyyy, hh24:mm:ss'), BUG_NUMBER from apps.ad_bugs where bug_number in ('9239090');
    no rows selected
    JFI
    Patches located in ad_applied_patches to which there is no a corresponding record in ad_bugs:
    SQL> SELECT a.patch_name, TO_CHAR(max(a.last_update_date),'dd-Mon-yyyy, hh24:mm:ss')
    2 FROM applsys.ad_applied_patches a
    3 WHERE NOT EXISTS (SELECT '1'
    4 FROM ad_bugs b
    5 WHERE b.bug_number = a.patch_name)
    6 group by a.patch_name;
    PATCH_NAME TO_CHAR(MAX(A.LAST_UP
    9239090 26-Oct-2013, 00:10:27
    AutoConfig 25-Oct-2013, 17:10:51
    merger9179588 25-Oct-2013, 11:10:30
    merger_post_5903765 27-Apr-2013, 23:04:45
    mergeu6678700 25-Oct-2013, 16:10:09
    What could have happened that this was not recorded in ad_bugs?
    How to I get this recorded in the ad_bugs table?
    Thanks
    Mathias

  • Ora-04021: timeout occured while waiting to lock object.

    I have upgraded the DB From 8.1.5 to 8.1.7 then 9.0.2
    but while converting to 9i it gave a warning that
    "some uncompiled objects were found".
    now the DB works fine with every DDL and DML operation but when I edit any precedure or function it hangs for 4 to 5 mins and then show the following error
    ora-04021: timeout occured while waiting to lock object.
    when I shutdown the DB and restarts it then it allowes me to edit any founction or procedure or package only for one time,then again shows the error when I try to edit second time.
    what my be the reason , can any body help me pl.
    thankx in advance.

    If you have oracle metalink support, then, read Note:169139.1. If not, give me your email id, i will send you the note.
    SJH

  • EXP-00056: ORACLE error 4021 encountered ORA-04021: timeout occurred while

    hi all oracle gurus ,
    i have this problem which i am facing its like this.i have a batch file that runs export every night one week back it was all okay .few days back when i looked the log files it gives me this error ---EXP-00056: ORACLE error 4021 encountered
    ORA-04021: timeout occurred while waiting to lock object
    what should i do this is a production database runing in windows platform and there is no backup pls help me .....
    export log file -------
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user PILOT
    . exporting foreign function library names for user FINANCE
    . exporting foreign function library names for user MBCNEWS
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user PILOT
    . exporting object type definitions for user FINANCE
    . exporting object type definitions for user MBCNEWS
    About to export PILOT's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    EXP-00056: ORACLE error 4021 encountered
    ORA-04021: timeout occurred while waiting to lock object
    ORA-06512: at "SYS.DBMS_METADATA", line 1511
    ORA-06512: at "SYS.DBMS_METADATA", line 1548
    ORA-06512: at "SYS.DBMS_METADATA", line 1864
    ORA-06512: at "SYS.DBMS_METADATA", line 3707
    ORA-06512: at "SYS.DBMS_METADATA", line 3689
    ORA-06512: at line 1
    EXP-00000: Export terminated unsuccessfully
    robyav

    this is a production database runing in windows platform and there is no backup
    what should iWell first of all you should stop using EXP for backups, it's quite unsuitable, and start using RMAN instead. Find out more.
    If you have a Metalink account you shoudl read Note:298968.1. But teh headline is there is a bug in 10gR1 which is fixed in 10gR2. This may not help you much. The workaround is to try running the export again later, which may not be any more helpful.
    Cheers, APC

  • ORA-02049: timeout: distributed transaction waiting for lock

    Hi,
    My name is Guneet and I'm working on an application running on BEA Weblogic Server 9.2 running on a Red Hat Linux box using Oracle 10g as the database. My problem is that recently our code started getting the following exception while updating a database table.
    java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
    Application Details
    * Using Stateless Session EJB
    * Only one Business method in this EJB with transaction attribute set to "required"
    * This method executes two select queries & one update query
    * We are using JDBC to access the database.
    * We have configured a Data Source & are using it to get a database connection.
    * Weblogic's Oracle Driver is being used.
    More details
    * The application has been running well since a month.
    * Two days ago,the update query failed with the above error.
    * At that time, a single client was accessing the system.
    * Once this problem occurs, it starts appearing frequently.
    * Eventually a request to get a connection from the Data Source times out & the exception copied at the end is thrown
    * At this stage the application gets stuck and all requests trying to get a connection end up with this exception.
    * Fortunately, Restarting the Weblogic Server gets us out of this problem and transactions resume normally.
    Now my questions are
    # Why is this error happening & what does it mean?
    # It looks like the second exception (unable to get a connection from ds) is an after effect of the first problem (ORA-02049) once it appears for a couple of times. Can somebody validate this?
    # Though I don't understand JTA well but I don't think this application needs distributed transactions so, I'm thinking of modifying the driver type to non-XA oracle driver. Any advise/pointers/comments on this front is welcome !!!!!!!!
    Thanks
    Guneet Sahai
    Exception Trace
    Dec 27, 2006 4:47:50 PM | com.gisil.themis.db | SEVERE | Unable to load merchant DEL = 911168900164. Reason - java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource 'themis-ds': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException: Unexpected error during start for XAResource 'themis-ds': Transaction timed out after 29 seconds
    BEA1-252DE51AC930078CA638
    at weblogic.jdbc.wrapper.XA.createException(XA.java:103)
    at weblogic.jdbc.jta.DataSource.start(DataSource.java:753)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1182)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1115)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:497)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:429)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1408)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1413)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

    guneet sahai wrote:
    Hi,
    My name is Guneet and I'm working on an application running on BEA Weblogic Server 9.2 running on a Red Hat Linux box using Oracle 10g as the database. My problem is that recently our code started getting the following exception while updating a database table.
    java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
    Application Details
    * Using Stateless Session EJB
    * Only one Business method in this EJB with transaction attribute set to "required"
    * This method executes two select queries & one update query
    * We are using JDBC to access the database.
    * We have configured a Data Source & are using it to get a database connection.
    * Weblogic's Oracle Driver is being used.
    More details
    * The application has been running well since a month.
    * Two days ago,the update query failed with the above error.
    * At that time, a single client was accessing the system.
    * Once this problem occurs, it starts appearing frequently.
    * Eventually a request to get a connection from the Data Source times out & the exception copied at the end is thrown
    * At this stage the application gets stuck and all requests trying to get a connection end up with this exception.
    * Fortunately, Restarting the Weblogic Server gets us out of this problem and transactions resume normally.
    Now my questions are
    # Why is this error happening & what does it mean?
    # It looks like the second exception (unable to get a connection from ds) is an after effect of the first problem (ORA-02049) once it appears for a couple of times. Can somebody validate this?
    # Though I don't understand JTA well but I don't think this application needs distributed transactions so, I'm thinking of modifying the driver type to non-XA oracle driver. Any advise/pointers/comments on this front is welcome !!!!!!!!
    Thanks
    Guneet SahaiHi Guneet. If you want to debug the JTA issue, I suggest opening an official
    support case. They will lead you through producing the JTA debug information.
    However, I believe you are correct that the transaction you describe is
    completely doable with a simple local transaction, so if you were to alter
    your pool to use the non-XA driver, it would probably be faster, simpler,
    and just work.
    Let me know...
    Joe
    >
    Exception Trace
    Dec 27, 2006 4:47:50 PM | com.gisil.themis.db | SEVERE | Unable to load merchant DEL = 911168900164. Reason - java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource 'themis-ds': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException: Unexpected error during start for XAResource 'themis-ds': Transaction timed out after 29 seconds
    BEA1-252DE51AC930078CA638
    at weblogic.jdbc.wrapper.XA.createException(XA.java:103)
    at weblogic.jdbc.jta.DataSource.start(DataSource.java:753)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1182)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1115)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:497)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:429)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1408)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1413)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

  • OWB9.0.4-- ORA-02049: timeout: distributed transaction waiting for lock

    I'm running a simple mapping that copies all columns of data (using a filter on date for just current records) from one table in SQL Server into a staging table on my Oracle DW schema. It's using a dblink with transparent gateway for SQL Server, which works fine from SQL*plus.
    The map is in default mode (bulk-failoverto-row) with bulk size and commit frequency = 1000.
    The audit details show the first 1000 rows selected on the source, with an error on both the source and target tables:
    Target--
    ORA-02049: timeout: distributed transaction waiting for lock
    Source--
    ORA-01002: fetch out of sequence ORA-02063: preceding line from INTERGRATION@JXNSQL01
    (INTERGRATION@JXNSQL01 is the dblink name)
    Any ideas on how I can clear this up?
    Thanks,
    Paul

    Hi,
    After having upgraded to 9.0.4 (from 9.0.3) I'm running into exactly the same problems with some of my mappings. Actually I don't get any rows transferred from the mappings that fail.
    Out of 7 mappings, 3 worked just liked before while the 4 others just keep on running until I cancel them and I then see the BUSY/ORA-02049 in the Audit Browser.
    When comparing the mappings I see that the 3 that works all use some custom Procedures I have made.
    The 4 that doesn't work are all very simple - one of them just loads all the content from a table with two columns in my source to another table with two columns in my target! Two of the other mappings that doesn't work includes some simple CASE-expressions.
    Both my source and my target resides in a Oracle 9.2.0.3 database (not the same).
    Regards,
    Bent Madsen

  • DatabaseError: ORA-02049: timeout: distributed transaction waiting for lock

    Hi all
    There is script running in my database 'A' that will select some data from tables in other database through DBLINK and update some tables too. The script which 6 I am running for the past 6 monts succesfully. Yesterday I got error saying that,
    DatabaseError: ORA-02049: timeout: distributed transaction waiting for lock
    ORA-02063: preceding line from test
    I have tested the Link and its active no issues in DBLINk
    I understand the objects which I am accessing the table in locked mode,
    SQL> select OBJECT_ID,SESSION_ID,PROCESS,LOCKED_MODE from v$locked_object where
    SESSION_ID=121;
    OBJECT_ID SESSION_ID PROCESS LOCKED_MODE
    77391 121 21394 3
    i
    I killed the session 121 and in v$session status is Killed, but I am getting the same error repeating while running the script. And the session_id is still in locked_mode.
    Could please add some light on this?
    -Thanks
    Antony

    Hi,
    I have killed the session which caused blocking and the status is KILLED for the past two days. But still the object is in locked mode
    SQL> select OBJECT_ID,SESSION_ID,PROCESS,LOCKED_MODE from v$locked_object where
    SESSION_ID=121;
    OBJECT_ID SESSION_ID PROCESS LOCKED_MODE
    77391 121 21394 3
    How would I resolve this any idea
    -Thanks & Cheers
    Antony

  • JDAPI Error: ORA-04020: deadlock detected while trying to lock object

    I have written a JDAPI program to perform read-only impact analysis and report any problems.
    The following error is occurring:
    "A deadlock among DDL and parse locks is detected.
    This deadlock is usually due to user errors in the design of an application or from issuing a set of concurrent statements which can cause a deadlock.
    ORA-04020: deadlock detected while trying to lock object /NSPC6/CHECK_FOR_FORM_CHANGE"
    The error refers to a procedure in a PL/SQL library.
    In one case the error occurred after my final "end of processing" message, which is followed only by a call to "Jdapi.shutdown()".
    Any ideas?
    Thanks,
    Neville Sweet.

    I have written a JDAPI program to perform read-only impact analysis and report any problems.
    The following error is occurring:
    "A deadlock among DDL and parse locks is detected.
    This deadlock is usually due to user errors in the design of an application or from issuing a set of concurrent statements which can cause a deadlock.
    ORA-04020: deadlock detected while trying to lock object /NSPC6/CHECK_FOR_FORM_CHANGE"
    The error refers to a procedure in a PL/SQL library.
    In one case the error occurred after my final "end of processing" message, which is followed only by a call to "Jdapi.shutdown()".
    Any ideas?
    Thanks,
    Neville Sweet.

  • ORA-04020: deadlock detected while trying to lock object SYS

    Upgrading database from 7.3.3 to 7.3.4. Running CAT7304.sql,
    Catalog.sql, and Catproc.sql. In the log file created there are
    mulptiple occurrences of;
    ORA-04045: errors during recompilation/revalidation of
    SYS.DBMS_SYS_SQL
    ORA-04045: errors during recompilation/revalidation of
    SYS.DBMS_SQL
    ORA-04020: deadlock detected while trying to lock object
    SYS.DBMS_SYS_SQL
    This only occurs on a Netware server, it works fine on NT.
    null

    Hi Steve,
    I recommend that you contact Oracle RDBMS support directly.Our
    main area of expertise is migrations from non-oracle
    environments.
    Regards
    John
    Steve Schindler (guest) wrote:
    : Upgrading database from 7.3.3 to 7.3.4. Running CAT7304.sql,
    : Catalog.sql, and Catproc.sql. In the log file created there are
    : mulptiple occurrences of;
    : ORA-04045: errors during recompilation/revalidation of
    : SYS.DBMS_SYS_SQL
    : ORA-04045: errors during recompilation/revalidation of
    : SYS.DBMS_SQL
    : ORA-04020: deadlock detected while trying to lock object
    : SYS.DBMS_SYS_SQL
    : This only occurs on a Netware server, it works fine on NT.
    Oracle Technology Network
    http://technet.oracle.com
    null

  • ORA-04020: deadlock detected while trying to lock object

    I was wondering if somebody could give me some advise on how to fix this problem.
    I have a table that I use for my full text search functionality in my web app.
    In this table I have an id and 1 clob column indexed using the intermedia.
    I have a stored procedure that does the populating and reindexing of this table and this should be run under dbms_jobs.
    What this procedure basically does is it concatenates the values of different textual columns in my schema and I stick it in in this clob column using the dbms_lob.writeappend, I have a loop that does this, and at the very end of the stored procedure I call a reindex of this clob column. This error occurs when it hits this reindex line. If I run the reindex outside of the stored procedure then it works fine. I need to put this functionality in 1 stored procedure so I could easily run it periodically using the dbms_jobs.
    This is the skeleton of my stored procedure: (Oracle version is 8.1.7.0.0.)
    procedure rebuild_my_intermedia_column is
    --cursor declaration here
    cursor outercursorvar is select ...
    cursor innercursorvar is select ...
    --variable declaration here
    vstr varchar2(32727);
    vclob clob;
    vlen1 binary_integer;
    vlen2 binary_integer;
    begin
    for v1 in outercursorvar loop
    vstr := ' ';
    vlen1 := 1;
    select intermedia_column into vclob from intermedia_table where pkid = v1.id FOR UPDATE;
    for v2 in innercursorvar loop
    if v2.textualcolumn is not null then
    vlen2 := length(v2.textualcolumn);
    if vlen1 + vlen2 > 32727 then
    dbms_lob.writeappend(vclob, vlen1, vstr);
    vstr := ' ';
    vlen1 := 1;
    end if;
    vstr := vstr | | v2.textualcolumn;
    vlen1 := vlen1 + vlen2;
    end if;
    ...more columns here
    end loop;
    if vlen1 > 1 then
    dbms_lob.writeappend(vclob, vlen1, vstr);
    end if;
    commit;
    end loop;
    --This is where the dealock error comes!.
    execute immediate 'alter index clobcolindexname rebuild parameters(''SYNC'')';
    end;
    I would appreciate your help on this.

    FYI. The alter index interface for SYNC and OPTIMIZE is no longer supported in 9i. We have discouraged the use of alter index for SYNC and OPTIMIZE since the PL/SQL
    interface for these was added in 8.1.6. Failures during sync or optimize can invalidate the index when using the alter index interface, forcing a complete index
    rebuild. The PL/SQL API does not carry this risk.
    For re-indexing we are recommending to use CTX_DDL.SYNC_INDEX called from a DBMS_JOB. Please take a look at the ctx_schedule utility at: http://technet.oracle.com/sample_code/products/text/content.htm

  • ORA-04021:timeout...

    Hi guys,
    I have a problem: when I try to replace or delete a package I recive
    an error message ORA-04021: timeout occurred while waiting to lock object XXX
    Of course it's becouse this package is used by another session.
    In v$access table I've found out whitch session it is, but I don't
    know how to kill or stop this session to allowed replacing of package.
    I killed the session and its status is marked as killed but the
    package is still used.
    Pls help me it's very important. Any solution how to compile this
    package is welcomed. Restart of database doesn't help, I tried :-(
    Thanx a lot.

    Most likely, the problem is that someone else in some other session is calling your procedure, which prevents you from locking it in order to run DDL against it. If this is a busy system, you'll likely have to wait for a downtime window in order to run your DDL. If this is not a busy system, you may be able to just retry the operation.
    Justin

  • ORA-00060: deadlock detected while waiting for resource CLOSE cursor

    Hi,
    I am a new member of this forum. I am working with a problem we got a few weeks ago. It is from a Pro C batch executable running on 10 threads dealing with >800 data accessed from multiple tables. The error as reported came from a package.function call.
    This is the error I encountered:
    process_item~G****, D***~-60~ORA-00060: deadlock detected while waiting for resource~PACKAGE ERROR = CLOSE cursor C_***** in package R***.I*** 7641
    The cursor is a simple SELECT cursor without Table or Record locking.
    My questions are:
    *Upon the occurrence of this error, is the execution already at the CLOSE cursor line or did the error occurred between the OPEN cursor and the CLOSE cursor? There are several lines of code in between OPEN and CLOSE:
    - one that calls for a package.function that simply stores parameter values to a variable
    - another one which fetches the cursor. The group that holds the cursor values is only used by a single function in the package
    *Is it possible for this CLOSE cursor to cause a deadlock? What could have caused this?
    *From what I know, Oracle deals with deadlocks by aborting the deadlocking process while others continue, but this deadlock caused our program to hang. How is this possible? Could the root cause of the deadlock be from our threading program? This is a rare occurrence and happened only twice this year.
    Thanks,
    Raf

    Raf Serrano wrote:
    Hi,
    I am a new member of this forum. I am working with a problem we got a few weeks ago. It is from a Pro C batch executable running on 10 threads dealing with >800 data accessed from multiple tables. The error as reported came from a package.function call.
    This is the error I encountered:
    process_item~G****, D***~-60~ORA-00060: deadlock detected while waiting for resource~PACKAGE ERROR = CLOSE cursor C_***** in package R***.I*** 7641
    The cursor is a simple SELECT cursor without Table or Record locking.
    My questions are:
    *Upon the occurrence of this error, is the execution already at the CLOSE cursor line or did the error occurred between the OPEN cursor and the CLOSE cursor? There are several lines of code in between OPEN and CLOSE:
    - one that calls for a package.function that simply stores parameter values to a variable
    - another one which fetches the cursor. The group that holds the cursor values is only used by a single function in the package
    *Is it possible for this CLOSE cursor to cause a deadlock? What could have caused this?
    *From what I know, Oracle deals with deadlocks by aborting the deadlocking process while others continue, but this deadlock caused our program to hang. How is this possible? Could the root cause of the deadlock be from our threading program? This is a rare occurrence and happened only twice this year.
    Thanks,
    RafSELECT (without FOR UPDATE) statements are never involved in ORA-00060.
    only DML statements throw ORA-00060 error

  • Ora-00060 dedlock detected while waiting for resource

    hi All,
    version 6i.
    i have a button save in my form when users makes any changes in the existing records and then press that save button they get an error frm-4059 unable to update record
    when i see the actual error by pressing shift+f1 i found ora-00060 deadlock detected while waiting for session.
    can any one know why this error occurred and how can i fix it.
    thnx.

    hi
    check error log and what trace file is saying?
    To resolve the issue, make sure that rows in tables are always locked in the same order.
    For example,
    in the case of a master-detail relationship, you might decide to always lock a row in the
    master table before locking a row in the detail table.

  • Database error"ORA-00060: deadlock detected while waiting for resource"

    Hi All,
    I got dump as
    Database error text........: "ORA-00060: deadlock detected while waiting for
      resource"
    Internal call code.........: "[RSQL/RDUP/NRIV ]"
    Please check the entries in the system log (Transaction SM21).
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
    in
    procedure "READ_NRIV" "(FORM)", nor was it propagated by a RAISING clause.
    Can u ppl tell me how to get correct this?
    Edited by: Bala Chandar on Jul 20, 2009 11:01 AM

    Hi Bala,
    Same type of dump we got when we trigger the DTP which in process chain to load data from DSO to Info cube. And the load had processed with 225 data package and at 164th data package we got this error and except 164th data package all data package processed successfully
    And the request was red. So we had done processed manually by clicking the icon. So all its been green and successfully loaded.
    So when you do process manual the particular data package which got failed will be process successfully  

  • Sqlldr- ORA-00060: deadlock detected while waiting for resource

    Hi Team,
    My database version is 11.1.0.7.0. I am loading the data using sqlldr. I am getting the error ORA-00060: deadlock detected while waiting for resource. once dead lock detected ,whether data will be rejected after commit point reached(Rows=100000). FYI information only sqllder is running on the database,it is getting completed withing 5-10min. please help me whether any other lock happening on this due to sqllder.
    sqlldr userid=orcl/orcle control=".$controlfile." log=".$logfile.".log data=".$datafile." bad=".$badfile." discard=".$discardfile." Bindsize=19000000 Rows=100000 Readsize=20000000 Errors=1000000";
    Thanks in advance

    user9256814 wrote:
    Hi Team,
    My database version is 11.1.0.7.0. I am loading the data using sqlldr. I am getting the error ORA-00060: deadlock detected while waiting for resource. once dead lock detected ,whether data will be rejected after commit point reached(Rows=100000). FYI information only sqllder is running on the database,it is getting completed withing 5-10min. please help me whether any other lock happening on this due to sqllder.
    sqlldr userid=orcl/orcle control=".$controlfile." log=".$logfile.".log data=".$datafile." bad=".$badfile." discard=".$discardfile." Bindsize=19000000 Rows=100000 Readsize=20000000 Errors=1000000";
    Thanks in advanceadditional clues will exist within alert_SID.ora file & subsequent trace file.

Maybe you are looking for

  • Which (non retina) 15 macbook pro to buy 2.3 or 2.6

    Lost a lot of confidence in apples direction lately with all the dumbing down and simplifying professional tools to the point of rendering them largely ineffective. I have to update my notebook which is my primary computer. My core work is in Apertur

  • MIDlet-missing on torch 9810

    Hi there I have a BB torch 9810, every time I try to download bb application world from the bb website, I get a MIDlet-name missing message. I have tried rebooting, I cannot reinstall/update OS because my service provider does not allow me to. Please

  • Working Between Illustrator and Photoshop

    Hi guys, I guess you could call me a novice when it comes to working between products, but I am using both photoshop and illustrator.  Photoshop, I'm obviously using for image editing and touch ups, illustrator I am using to create graphics.  I am wo

  • Photos icon on iCloud does not appear. How can i access my previously saved Photos on iCloud????

    Prior to losing my phone last week, I had luckily updated all my photos and contacts on iCloud. I also remeber ticking on the photo settings to allow for my photos to be saved on iCloud. However when i accessed my iCloud account from my PC, I found a

  • OS9 on an Intel-based Mac

    I'm thinking of buying an Intel-based Mac, but would really like to be able to use my favorite word processor (Word 5.1), which runs in OS9. Has any way been developed to run OS9 applications on an Intel Mac? I've heard about Sheepsaver, but have not