DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: ORA-04021: timeout occurred while waiting to lock object

  1. #1
    Join Date
    Apr 2008
    Posts
    26

    Question ORA-04021: timeout occurred while waiting to lock object

    Dear all,
    Hi I'm Rahul,
    today i faced a problem while creating the package thru oracle forms6i on oralce 9i (rel2) database. My database is on win3kserver.

    ORA-04021: timeout occurred while waiting to lock object.

    Does it related to Locking objects.
    Its generating trace file but i could not able to understant whats the matter.
    If nebody knws Plz help me out...

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    somebody is using the package you wanted to compile.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Apr 2008
    Posts
    26
    Quote Originally Posted by PAVB
    somebody is using the package you wanted to compile.
    Hi PVB
    But i have kill all the session login with the username

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    well someone is using it

  5. #5
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    try this after login into the database as SYS...
    Code:
    select  decode(lob.kglobtyp, 
            0, 'NEXT OBJECT ', 
            1, 'INDEX ', 
            2, 'TABLE ', 
            3, 'CLUSTER ', 
            4, 'VIEW ', 
            5, 'SYNONYM ', 
            6, 'SEQUENCE ', 
            7, 'PROCEDURE ', 
            8, 'FUNCTION ', 
            9, 'PACKAGE ', 
            11, 'PACKAGE BODY ', 
            12, 'TRIGGER ', 
            13, 'TYPE ', 
            14, 'TYPE BODY ', 
            19, 'TABLE PARTITION ', 
            20, 'INDEX PARTITION ', 
            21, 'LOB ', 
            22, 'LIBRARY ', 
            23, 'DIRECTORY ', 
            24, 'QUEUE ', 
            28, 'JAVA SOURCE ', 
            29, 'JAVA CLASS ', 
            30, 'JAVA RESOURCE ', 
            32, 'INDEXTYPE ', 
            33, 'OPERATOR ', 
            34, 'TABLE SUBPARTITION ', 
            35, 'INDEX SUBPARTITION ', 
            40, 'LOB PARTITION ', 
            41, 'LOB SUBPARTITION ', 
            42, 'MATERIALIZED VIEW ', 
            43, 'DIMENSION ', 
            44, 'CONTEXT ', 
            46, 'RULE SET ', 
            47, 'RESOURCE PLAN ', 
            48, 'CONSUMER GROUP ', 
            51, 'SUBSCRIPTION ', 
            52, 'LOCATION ', 
            55, 'XML SCHEMA ', 
            56, 'JAVA DATA ', 
            57, 'SECURITY PROFILE ', 
            59, 'RULE ', 
            62, 'EVALUATION CONTEXT ', 
            'UNDEFINED ') object_type, 
            lob.kglnaobj object_name, 
            pn.kglpnmod lock_mode_held, 
            pn.kglpnreq lock_mode_requested, 
            ses.sid, 
            ses.serial#, 
            ses.username 
    from    sys.v$session_wait vsw, 
            sys.x$kglob lob, 
            sys.x$kglpn pn, 
            sys.v$session ses 
    where   vsw.event = 'library cache lock ' 
    and     vsw.p1raw = lob.kglhdadr 
    and     lob.kglhdadr = pn.kglpnhdl 
    and     pn.kglpnmod != 0 
    and     pn.kglpnuse = ses.saddr 
    /
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  6. #6
    Join Date
    Apr 2008
    Posts
    26
    Hi

    After executing this output is no row selected

  7. #7
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Good... compile the package then.

    if you get any error please copy/paste the whole error stack.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  8. #8
    Join Date
    Apr 2008
    Posts
    26
    Hi PAVB

    Thanks now its compiled.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width