To can find lock object

Hi friend;
I have one issue. I have scheduled procedure and it runs like 5 min.Let us say it start 10.00 pm Somehow yesterday couse of lock of table cause of to wait to compliate this procedure like 4 hours,thatswhy all other schedule delay.My procedure complate like 02.00 am then other process started to run.
I used AWR also try to query DBA_HIST_ACTIVE_SESS_HISTORY but cant find what,why,who locked table on time 10.00pm which cause and pretend to run my procedure
Is there any way to identify this why i have this lock?(Already check trc,alert log file but no luck to find any clue)
Regards
Helios

-- show lock related information
select     OS_USER_NAME os_user,
     PROCESS os_pid,
     ORACLE_USERNAME oracle_user,
     l.SID oracle_id,
     decode(TYPE,
          'MR', 'Media Recovery',
          'RT', 'Redo Thread',
          'UN', 'User Name',
          'TX', 'Transaction',
          'TM', 'DML',
          'UL', 'PL/SQL User Lock',
          'DX', 'Distributed Xaction',
          'CF', 'Control File',
          'IS', 'Instance State',
          'FS', 'File Set',
          'IR', 'Instance Recovery',
          'ST', 'Disk Space Transaction',
          'TS', 'Temp Segment',
          'IV', 'Library Cache Invalidation',
          'LS', 'Log Start or Switch',
          'RW', 'Row Wait',
          'SQ', 'Sequence Number',
          'TE', 'Extend Table',
          'TT', 'Temp Table', type) lock_type,
     decode(LMODE,
          0, 'None',
          1, 'Null',
          2, 'Row-S (SS)',
          3, 'Row-X (SX)',
          4, 'Share',
          5, 'S/Row-X (SSX)',
          6, 'Exclusive', lmode) lock_held,
     decode(REQUEST,
          0, 'None',
          1, 'Null',
          2, 'Row-S (SS)',
          3, 'Row-X (SX)',
          4, 'Share',
          5, 'S/Row-X (SSX)',
          6, 'Exclusive', request) lock_requested,
     decode(BLOCK,
          0, 'Not Blocking',
          1, 'Blocking',
          2, 'Global', block) status,
     OWNER,
     OBJECT_NAME
from     v$locked_object lo,
     dba_objects do,
     v$lock l
where      lo.OBJECT_ID = do.OBJECT_ID
AND l.SID = lo.SESSION_ID;
Regards
Asif Kabir

Similar Messages

  • Report to find Locked objects in sap system

    Hi All,
    does anyone know the report to find out the locked objects in an sap system?
              or
    name of the table that stores locked objects ?
    or any other way through which we can find the number of locked objects ?
    Thanks and regards
    Abdul Hadi

    Hi,
    You can unlock locked objects in transaction SE03.
    Click on Display Repaired objects.
    You can see all the objects that are locked.
    To unlock you can select the particular object and click on Unlock.
    Do reward points if the answer to your question is met.
    Regards
    Suhas

  • Find lock object for field

    Hi Friends,
    I have one qurey. I would like to know the lock object for field MATNR.
    Any suggestion how I can find it out the lock object for specific field.
    Regards,
    Poonam

    hi,
    GOTO se11.
    select Lock object Radio button.
    Press F4.
    A popup appears, in that popup, under Short Description, type
    *Material* and press enter. you will get a list of lock objects, select your required.
    Always give the first letter in CAPS. like *Material*.

  • How to find locked object query?

    There is random error ORA-00054 coming during execution of one process which is using SELECT FOR UPDATE NO WAIT statement.
    Logs of process is showing row is accessed only once but still it gets error of "resource busy".
    So there must be any other session which is locking object and it is not identifid. I want to identify which other session/user is locking object.
    I am trying with below query which shows session id, terminal name and object name which is locked.
    SELECT a.sid,a.serial#, a.username,c.os_user_name,a.terminal,
    b.object_id,substr(b.object_name,1,40) object_name,sysdate
    from v$session a, dba_objects b, v$locked_object c
    where a.sid = c.session_id
    and b.object_id = c.object_id But i want information of SQL query from v$sqltext so i can find out throughout the applicaiton where it is executed?
    Thanks

    Finding session that it locking is not a problem.
    Finding SQL responsible is not necessarily straightforward.
    You might be lucky. You might not.
    If the SQl responsible for locking the row ran for a long time or was blocked by something else, AND you're on version >= 10g AND you're licensed for Diagnostic Pack, then you should find some evidence in ASH - DBA_HIST_ACTIVE_SESS_HISTORY.
    Doug Burns has a 10-part series on the subject.
    http://oracledoug.com/serendipity/index.php?/archives/1477-Diagnosing-Locking-Problems-using-ASH-Part-1.html
    There is another current thread on the same issue:
    How to find sql statement which generates LOCK

  • Finding locked objects in design repository?

    Does anyone know if it is possible to get a list of objects that are currently locked by users inside a design repository?
    I am looking for something that is equivalant to what v$locked_object is for Oracle objects. I've tried looking at the tables/views/procedures defined in the Control Center but I haven't been able to figure out a way to do it.
    I am writing some scripts to automate the export/import of MDLs between repositories. I'd like to be proactive about checking locks in the repository before attempting to import the MDL.
    Thanks.

    HI,
    it seems that OWB uses DBMS_LOCK package for locking objects, so you can extract OWB internal lock names from SYS.DBMS_LOCK_ALLOCATED table (name OWB locks begin with 'OWB'). Locked object id (from all_iv_all_objects) specified at the end of lock name in reverse order.
    But I don't now how to get type of locking (opening object also creates a lock).
    Oleg

  • Locked Objects

    Hi,
    I want to ask is that if i can find any objects in the V$locked_Object then do i need to kill those sessions always????
    The thing is when i see some objects in the locked_objects i am looking for the query which is locking the object. But after some that that sesssion removed from V$locked_Object
    Sometimes if i track any locked object and find the query related to it that time query is normal query of SELECT.
    1. So do i need to worry about it to resolve lock? And always i need to kill that session which is in V$Locked_Object.
    2. Also please let me know how can i check which SQL statements in a day locking objects in the database Can we check this one?
    Please give any idea about.

    DBA_BLOCKERS lists the sessions that hold a lock that another session is blocked on a request for. DBA_WAITERS lists the sessions that are blocked requesting a lock that some other session holds. Are you seeing any rows in these tables? If we're talking about a bunch of sessions that are taking out row share locks, for example, there's nothing to be concerned about because those aren't (generally) going to block anyone else.
    If you are, are the blocks resolving themselves? A session that takes out a lock might block another session temporarily, but as long as the blocker finishes its processing and releases the lock within a reasonable time frame, the waiter should be able to continue after the lock is released. There may be options to redesign the application so that the blocker locks fewer objects/ fewer rows/ holds the lock for less time in order to decrease contention, but certainly nothing that would require DBA intervention.
    The case where a DBA needs to be involved is when
    - A session takes out a lock that is capable of blocking other sessions
    - For whatever reason, that session fails to release the lock
    - One (or more) other sessions are blocked waiting for the lock to be released
    The classic example of this would be an application that was poorly designed to do pessimistic locking and to hold locks across user interactions. So if an application does a SELECT FOR UPDATE to lock a particular row and holds that row while waiting for a human to do something, but the human decides to go to lunch/ work in a different application/ go on vacation, every other user that tries to lock that same row is going to block, which can be highly unpleasant.
    Justin

  • Regarding Lock Object

    Hi Experts,
    Can you please guide me how i can find out the lock object name. If i know the table name. is there any table which stores the table name and lock object name for that table.
    Or any function module to which i can pass table name in return i can get lock object name.
    i have to do all this by coding.
    Its very urgect.
    Thanks in advance.
    AZAD:)

    Hi
    Lock Objects Tables is: <b>DD25L</b>
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    - Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    - Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    - Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    check this link for example.
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    tables:vbak.
    call function 'ENQUEUE_EZLOCK3'
    exporting
    mode_vbak = 'E'
    mandt = sy-mandt
    vbeln = vbak-vbeln
    X_VBELN = ' '
    _SCOPE = '2'
    _WAIT = ' '
    _COLLECT = ' '
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Reward points if useful
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • How to find business object for particular tcode at particular event

    Hi,
    I want to know how i can find particular business object for particular tcode for certain event?
    For example suppose for tcode PA40, if i create infotype for employee and when i save it after creating it then it must be stored in certain object. How i can find business object where all data realted to emp. get saved?
    Thanks & Regards,
    Parag

    Hi Parag,
    To get the business object for given transaction,
    1) Go to transaction SWELS
    2) Switch on the event trace.
    3) Go to the given transaction (For which you want to know the business object)
    4) Execute the transaction
    5) Go back to SWELS and Switch off the event trace
    6) Go to transaction SWEL.. Here you will get the Business Object name (one which starts with BUS)
    Hope this will help you.
    Best Regards,
    Deepa Kulkarni

  • What is the use for lock object and how to use the lock objects

    Hi Guru's,
    I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque  function modules .

    hi ,
    below are some minfo about lock objects :
      Lock Objects
    These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
    In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
    To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
    Creating Lock Objects
    Lock object is an aggregated dictionary object and can be defined by using the following steps:
    o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
    o Enter short text as usual and the name for primary table.
    -Save
    -Select Tables option
    From this screen you can:
    Select secondary tables, if any, linked by foreign key relationship.
    Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
    1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
    reward if helpful ,
    Regards,
    Ranjita

  • How to create lock object  when the total length is more than 300bytes?

    Dears:
    I want to create lock object for a add-on table , and the total length of  table's fields is more than 300 bytes.
    When I acitve this object, it will show "Total length of lock argument for table ZTEST_XXX longer than 300" error message in log.
    Is there any way  which can create  lock object when total length > 300bytes? 
    Thanks in advance.
    Best regards
    Lily

    Hi, Sudhi Karkada Sandeep Kumar 
    Thank you very much for your help.
    When the total length of  keys is more than 150bytes, lock object can't be created.
    Best regards,
    Lily

  • How to find sql objects in folder having Ansi_Nulls OFF?

    I have a folder having thousands of stored procedures and functions. Some of those procs and functions havent been deployed to database.
    Is there any way i can find all objects in that folder having ansi nulls off? 

    Check http://helpdeskgeek.com/how-to/search-inside-multiple-text-files-at-once/
    If you have Visual Studio installed, check
    http://msdn.microsoft.com/en-us/library/aa264360(v=vs.60).aspx
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Find modify objects time

    Hi Friends,
    As I know, with tool, we can find modified object in dataabse.
    Oracle can find object created time. when it is modified by some person, without audit tool, Does oracle11g2 have any building view or utility to find object last modified time in database?
    I use oracle 11g2 EE both window and Linux.
    Thanks in advance!
    newdba

    Oradb wrote:
    Hi Friends,
    As I know, with tool, we can find modified object in dataabse.
    Oracle can find object created time. when it is modified by some person, without audit tool, Does oracle11g2 have any building view or utility to find object last modified time in database?
    I use oracle 11g2 EE both window and Linux.
    Thanks in advance!
    newdbaquery ALL_OBJECTS
    Handle:     Oradb
    Status Level:     Newbie
    Registered:     Aug 13, 2007
    Total Posts:     1,019
    Total Questions:     435 (362 unresolved)
    WHY so many unanswered questions?

  • Find Authorisation Object Usage

    Hi all,
    I want to find which auth object defined for a SAP report. For example i want to disable some users to reach sales order change documents. How can i find auth objects for this and disable users to reach ?
    Regards,
    techmaster

    Hi,
    You can find auth object in SU24 transaction code, but if you disable in SU24 it will effect for all users who have this report via a role.
    So I recommend you to create roles for this report with different activities.
    Thanks
    mohan

  • To find locks on the objects  for the table-- urgent

    hi all..
    how to find which lock object is used for the table T001b...
    i want to lock a record of the table t001b before righting the select query and then  do some mofification and the unlock it again..
    plz can any one tell me how to do this...
    thnx
    Message was edited by:
            neha gupta

    Hi Neha,
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    check this link for example.
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    tables:vbak.
    call function 'ENQUEUE_EZLOCK3'
    exporting
    mode_vbak = 'E'
    mandt = sy-mandt
    vbeln = vbak-vbeln
    X_VBELN = ' '
    _SCOPE = '2'
    _WAIT = ' '
    _COLLECT = ' '
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Thanks,
    Reward If helpful.

  • How can we release the locked objects..

    Hi,
    I have created some objects such as pages and iviews in the portal. If i edited any of the object, then when next time when i access the object, I am hgetting a message as object is locked by admin, you canot edit it. Infact, I have logged in as admin.
    How can we release the lock of objects?
    Your help and suggestins solicited...
    Best regards,
    Sudhesh...

    Login as the Portal Administrator.
    Go to System Administration > Monitoring ->Detailed navigation -> Object Locking
    Here you can find all the objects that are in locked state.
    Now to unlock,  tick mark the object that you want to work with & click on the "Unlock" Button.

Maybe you are looking for

  • Is there a way to make Color understand Cyrillic symbols in file names?

    When I'm working with any clips, that have non-latin symbols in their file names, Color names them with some system-specific symbols, and every file is named in a very inconvenient way. The files are named so weirdly, that I really can't understand w

  • How can I select events from two different channels?

    Hi everybody, I have another question! :) When processing events in config.xml, using a CQL sentence, Eclipse compiler doesn't allow me to select more than one event. I paste here my app.context.xml and my config.xml: app.context.xml: <wlevs:event-ty

  • Integration of an iview in a portal

    Hi, how can I integrate a deployed iview in a portal to runtime so that other users can access the iview? Thanks for answers! Regards, Sven

  • .docx file completely disappeared

    A .docx file I created yesterday has completely disappeared.  I saved it either to my dropbox or my desktop (mac os x 10.8.5).  I could not find it by name, content, date created either in spotlight or in time machine.  In my Office 2011 Autorecovery

  • Failed to build mocha shape data

    Hello, I come with error that adobe is sending me when im trying to paste my mocha shape data in AE. This is what is showing in message : "AEGP Plugin MochaShapeConverter : Failed to build correct mocha shape data. ( 5027 :: 12 )" I took some steps t