Session ids blocking themselves

theres a scenario where in a session id is blocking itself. the wait type is latch_ex - access_method_database_parent
I am capturing the queries and will work on optimizing them however am looking for possible reasons for this.
Environment
Windows server 2008 sp2, SQL Server 2008 R2 ent sp1, CPU=32 , RAM 32
Server level MAXDOP=0 tried changing it to 16 but the problem persists.
Thanks, Ahmad Osama www.ahmadosama.net http://www.sqlservergeeks.com/people/AhmadOsama

When an SPID is waiting for an I/O page latch, you may notice that the
blocked column briefly reports that the SPID is blocking itself. This behavior is a side effect of the way that latches are used for I/O operations on data pages. When a thread issues an I/O request, the SPID that issues the I/O request acquires a
latch on the page. All SQL Server 2000 I/O operations are asynchronous. Therefore, the SPID will try to acquire another latch on the same page if the SPID that issued the I/O request must wait for the request to finish. This second latch is blocked by the
first latch. Therefore, the blocked column reports that the SPID is blocking itself. When the I/O request finishes, the first latch is released. Then, the second latch request is granted.
Y'know, maybe I have seen this but not recently, I think I may have seen this in the 2005-2008 era when some of these behaviors were new.  That is I noticed them, I guess they're probably still occurring but these days, any block that clears itself
within a second or two has not been my highest priority!  Self-deadlocks, that's a whole other thing!
This may be enough answer for OP - parallel plan, threads fighting over a common page but not really, just queueing up for it.  20-30% CPU is nothing to worry about even as a constant, it's CERTAINLY nothing to worry about if the average is lower and
30% is the peak!
Though if that kind of thing *is* the cause, and the condition lasts for more than a second, I'd be curious just what the query is doing!  Maybe a whole bunch of child rows being changed with foreign keys to the same parent?
Josh
As I said .. I don't think its related to data pages ...
http://www.sqlskills.com/blogs/paul/most-common-latch-classes-and-what-they-mean/
http://www.sqlservercentral.com/Forums/Topic969963-360-1.aspx
Thanks, Ahmad Osama www.ahmadosama.net http://www.sqlservergeeks.com/people/AhmadOsama

Similar Messages

  • Has no value definition - Session INIT Block.

    Hi,
    I have a Session initialization block for Fetching Departments from a Security table for the user logging in.
    One user can have Multiple Departments assigned to him, so i enabled Row-wise initialization in INIT Block.
    But when a user not assigned to any departments logs in, i am getting 'Session variable has no value definition' error in all the reports. But i should instead pass a default value when SQL in INIT Block is not returning anything. Like '0'.
    How can i do this? please respond.
    Thanks
    Swami

    Hi Swami,
    When the query fetches a result set, the variable gets initialized.
    But, when the query doesn't fetch any rows, the variable doesn't gets initialized and hence "no value definition" errors out.
    So, to avoid this,
    In the query itself, place an exception condition which returns '0'.
    select dept_name from table
    where user_name = ':user'
    UNION
    select '0' from table
    where user_name <> ':user'or you can use like this
    select CASE WHEN user_name = ':user' THEN dept_name ELSE '0' END
    from tableP.S: Query written orally. (Pls adjust the query accordingly)
    Regards,
    Raghu

  • How to invalidate session ids

    dear all ,
    Any knows how to invalidate the session ids .
    Ex . Server maintains maintains many client session ids
    I want invalidate those client session ids ,,,'

    There are several cases when a session is invalidated:
    1. when the time specified in web.xml elapsed (session-timeout tag) - this is specified for the entire server
    2. when using session.setMaxInactiveInterval. specs:
    "Specifies the time, in seconds, between client requests before the servlet container will invalidate this session."
    3. when you call session.invalidate() specs: " Invalidates this session then unbinds any objects bound to it." With this, the session is immediately invalidated.

  • J2EE session variables & Non Random Session IDs

    Our server keeps failing our PCI compliance test due to the Session ID's being non random.
    Description: Web Server Uses Non Random Session IDs       Synopsis: The remote web server generates predictable session IDs.      Impact: The remote web server generates a session ID for each connection.  A session ID is typically used to keep track of the actions of a user while he visits a web site.  The remote server generates non-random session IDs.  An attacker might use this flaw to guess the session IDs of other users and therefore steal their session.  See also : http://pdos.csail.mit.edu/cookies/seq_sessionid.html        Data Received: Sending several requests gives us the following session IDs : CFID=896744 CFID=896745 CFID=896746 CFID=896747 CFID=896748      Resolution: Configure the remote site and CGIs so as to use random session IDs.       Risk Factor: Medium/ CVSS2 Base Score: 6.4       AV:N/AC:L/Au:N/C:P/I:P/A:N
    We are using J2EE session variables which I though was the more secure option. Is there something else you have to do to guarentee that the Session ID's are non random or is this the Compliance test picking up on a false positive?
    P.S. It's a recent migration to CF10, don't know if that has anything to do with it.

    Personally, I use the client scope instead of the session scope so that I don't have to worry about sticky sessions.  That has always worked out nicely for me.
    I read that article you referenced, and it's got some interesting stuff.  In particular, I have seen the client scope database tables not purge as they're supposed to.  And the stuff about preparing, executing, and then unpreparing SQL statements on each request is alarming, if true.
    However, I have to say that I have never, ever, ever, ever had performance issues due to client variables.  Not once.  Whatever performance hit my application may incur from using client variables has, to this point, been completely dwarfed by the performance of the application itself.  And, c'mon, the stuff about being lazy because you don't want to spend precious engineering time worrying about something like session management (which is never going to add value to your product) rather than coding something actually useful to your end users...that seems overly harsh to me.
    I completely agree that storing client vars in the Windows Registry is bananas, as is the defualt 90 day purge limit (though as of CF 9.0.whatever, the default is 1 day, 7 hours, so clearly they've made some changes since this article was written).  But I'm loathe to throw away client-based management.
    I think, getting back to the issue at hand, that this may be a false positive.  CFID is sequential, but CFTOKEN is not; that should really be the end of the story.  I'll see if McAfee will listen.  (-;

  • ALC-UPG-221-002: Errors while migrating archive session Ids.

    I am doing an out of place upgrade from ES2 to ES4.  I have run the Turnkey ES4 upgrade, installed SP1, copied the GDS from the old location to the new location and run Configuration Manager.  When I get to the "Perform
    critical tasks before component deployment" screen and click the Start button I get this error:
    10:07] ALC-UPG-002-505: Disabling UserManager synchronization.
    [10:07] ALC-UPG-001-501: Executing [Application Manager] plugin ...
    [10:07] ALC-UPG-001-503: [Application Manager] plugin execution failed, error message from plugin is [ALC-UPG-221-002: Errors while migrating archive session Ids.].  See LCM logs for details.
    [10:07] ALC-UPG-002-506: Enabling UserManager synchronization.
    The LCM log has this:
    [2014-08-06 10:32:58,555], INFO, AWT-EventQueue-0, com.adobe.livecycle.upgrade.gui.UpgradePhaseDialog, ALC-UPG-002-505: Disabling UserManager synchronization.
    [2014-08-06 10:32:58,560], INFO, Thread-32, com.adobe.livecycle.lcm.feature.lcServer.LCServerConnector, LC Connection properties: {DSC_DEFAULT_SOAP_ENDPOINT=http://localhost:8080, DSC_TRANSPORT_PROTOCOL=SOAP, DSC_CREDENTIAL_PASSWORD=********, DSC_REQUEST_TIMEOUT=1200000, DSC_CREDENTIAL_USERNAME=administrator, }
    [2014-08-06 10:32:58,560], INFO, Thread-32, com.adobe.livecycle.lcm.feature.lcServer.LCServerConnector, Validating connection...
    [2014-08-06 10:32:59,961], SEVERE, Thread-32, com.adobe.livecycle.upgrade.control.PhaseRunner, Aborting.  Invocation of method [configurePreDeploy] failed for com.adobe.livecycle.upgrade.plugins.from9xto100.applicationmanager.Upgrade9xTo100Applicat ionManagerPlugin.  Caught com.adobe.livecycle.upgrade.UpgradeException, message: ALC-UPG-221-002: Errors while migrating archive session Ids.
    com.adobe.livecycle.upgrade.UpgradeException: ALC-UPG-221-002: Errors while migrating archive session Ids.
    at com.adobe.livecycle.upgrade.plugins.from9xto100.applicationmanager.Upgrade9xTo100Applicat ionManagerPlugin.configurePreDeploy(Upgrade9xTo100ApplicationManagerPlugin.java:110)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.adobe.livecycle.upgrade.control.PhaseRunner.run(PhaseRunner.java:244)
    at java.lang.Thread.run(Thread.java:724)
    [2014-08-06 10:33:01,763], INFO, AWT-EventQueue-0, com.adobe.livecycle.upgrade.gui.UpgradePhaseDialog, ALC-UPG-002-506: Enabling UserManager synchronization.
    Nothing tells what the errors are.

    Dear Pallavi,
    Very useful post!
    I am looking for similar accelerators for
    Software Inventory Accelerator
    Hardware Inventory Accelerator
    Interfaces Inventory
    Customization Assessment Accelerator
    Sizing Tool
    Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
    Request help on such accelerators... Any clues?
    Any reply, help is highly appreciated.
    Regards
    Manish Madhav

  • List all active login sessions IDs

    Hi,
    I want to enumrate all active login sessions for session IDs. I found some api SessionGetInfo which gives current user
    session ID. and getutmpxent which gives process id of (as i understand id of process creating session) all sessions. I
    want to map pid to session id. or is there any other way to list the session IDs of all logged in users.
    Thanks.

    Hi Nagendra,
    You can get the informamtion through one more option also. In case of function module you need to execute the module again and again for each user or may be need to write a report. I would like to suggest you an alternative. That is making use of queries.
    1. Go to transaction SQVI.
    2. In the input field Quick View give the any name for query for example Z_EMAIL_ADD.
    3. Choose create option. In the resulting pop up give description in Title field. In data source choose TABLE JOIN. Select Basis mode.
    4. In the next screen choose INSERT TABLE pushbutton and in the pop up give USR21. Then again choose INSERT TABLE pushbutton and this time give ADR6.
    5. Now go back using back arrow or F3.
    6. Now in the new screen you will be under the tab strip List fld select.. From that entries under available filed (on right hand side) select User name in user master record and the first entry for Internet mail (SMTP) address. Now using single arrow pushbutton poitning towards left move these fields to tabstrip List fld select.
    7. Now go to tabstrip selection filed. As done in step 6 move User name in user master record under it.
    8. Save the changes and go back. A pop up will come asking you to save quick view Z_EMAIL_ADD. Choose yes.
    9. Now execute the query. In the input field you can give one user or multiple users at a given time.
    Regards,
    Rajesh

  • Two sessions are blocked each other in

    Hi All,
    My database is Exadata machine. 11.2
    These days we encountered one case, that is two sessions are always blocked by each other. I get this info from v$session blocking_session.
    For examle, the information looks like
    sid blocking_session event
    1 2 libarary cache lock
    2 1 row cache lock
    and as you know there are many other sessions are blocked by sid 1.
    By lookiing up v$sql, I got the sql for these 2 sessions.
    /* QSMQ VALIDATION */ ALTER SUMMARY "XXXXX"."Gxxx_CP_CAL_TIME_TEMP_MV" COMPILE
    /* QSMQ VALIDATION */ ALTER SUMMARY "XXXXX"."Gxxx_CP_CAL_TIME_MV" COMPILE
    Both of these 2 MV share some underlying objects. And both of the 2 sessions started at the same time roughly.
    If the compilation incurs the lock on the object, why the 2 sessions block each other?
    Can someone give me some tips,please?
    Best regards,
    Leon

    Leon,
    sid blocking_session event
    1 2 libarary cache lock
    2 1 row cache lockYou are saying that above situation does not cause a deadlock error to be generated in either one of those two sessions?
    /* QSMQ VALIDATION */ ALTER SUMMARY "XXXXX"."Gxxx_CP_CAL_TIME_TEMP_MV" COMPILE
    /* QSMQ VALIDATION */ ALTER SUMMARY "XXXXX"."Gxxx_CP_CAL_TIME_MV" COMPILEThese to me look like programmed 'ALTER SUMMARY' commands (the comment in front of the statement seems to indicate so). It's the application that's doing this right?
    - Can you reproduce this with two sqlplus sessions?
    - Why is the application compiling the MV's? Are underlying objects being altered frequently?
    - Should the application not just be 'refreshing' the MV's instead of compiling them?
    Just some thoughts.
    Toon
    Edit:
    Dom's right. The alter summary statements seem to be Oracle internal calls generated by DBMS_MVIEW.REFRESH executions.
    Edited by: Toon Koppelaars on Nov 24, 2011 10:41 AM

  • Sites identified to allow, allow for session or block cookies in exceptions diappear

    I identify sites to allow, allow for session or block cookies in the exception tab in the privacy tab. These sites all disappear when Firefox is closed without any action on my part. I have to repeatedly reenter the sites again. How do I arrange to make the remain until I make a change?

    Do not use [[Clear Recent History]] to clear the "Cookies" and the "Site Preferences"
    Clearing "Site Preferences" clears all cookies, images, pop-up windows, software installation, and password exceptions.
    * http://kb.mozillazine.org/Cookies

  • Database Session IDs

    I've tried finding an answer and it seems simple enough but I was wondering if anybody could help with the following:
    -It might help that what I have in mind is creating a staging table that stores a session id and a couple other columns. A final procedure is called in the end that takes the data from the staging table and inserts into another based on the session id and another column and deletes it from the staging table. I'm a little concerned that that if an error occurs in one the prior procedures that data will not be cleaned up. My thought was to create a shell script that ran every so often that will remove any entries deemed to be over a certain time limit. However, it got me thinking about sessions ids and if it is possible that a session id could be used again. It would cause a problem if the there was an error and the script hadn't run yet and the session id was reused again. Therefore my questions below.
    Are Session IDs unique?
    Are Session IDs reused?
    If so, is there a general rule of thumb of how frequently they could be used again?
    Any help would be appreciated.
    Thanks

    First, what, exactly do you mean by "Session ID"?
    If you mean SID (from v$session), yes, SIDs are reused all the time. The combination of SID and SERIAL# from V$SESSION is generally unique enough. It will be reused, but on a much longer time scale.
    If you mean SYS_CONTEXT('USERENV','SESSIONID'), the auditing session identifier, that should be unique assuming it is populated (it is not populated for SYS sessions, for example).
    If you mean something else, you'll have to be a bit more specific.
    Justin

  • Identifing which session is blocking which session

    Dear All,
    We are having 500 user we don't have Database administrator.
    All of us are Form6i/Report6i developers.
    We do basic DBA activities liking creation of user, taking backup etc.
    Recently we have started facing follwoing problem:
    1) Our HR department uses 5-10 different types of report.
    Other departments uses 1-5 types of reports.
    HR & Other department even though refering to different reports are using some common tables which are used in HR as wel as Other department's report.
    Report of HR gets hanged.
    What we observe in "Enterprise Manager Console" in session that there are non HR user which are also running report.
    The information we see is "Memory Usage","I/O reads","CPU time","Session","User" and so on. We just see who is using maximum memory or CPU time or I/O reads and on basis of that we kill the user (which may be inappropriate)
    What we are enable to understand is at that point of time which user SQL is blocking which user.
    e.g: user "PKP0001" session is inactive and he calls us and tells my report is hanged. We want to identify which user if we kill will allow "PKP0001" user's report to get executed.
    2) User executes there report and get the result on the screen. User gets what he wants but when we see in Enterprise Manager Console" in session even though his task is complete it shows status as inactive with his high "I/O reads","Memory", "CPU" time. so we have to identify and call that user confirm whether he is running any form or report if not then kill his session or ask him to close the application.
    In this case how would we identify without asking the user whether he doing something or not.
    Any mehtod we need to implement in our form6i and report 6i which will take care of that.
    Kindly suggest as soon as possible.
    Thanking You in anticipation.
    Devendra .

    Devendra,
    It is fairly easy to determine which session is blocking another session. Take a look at the SQL statements in this thread (the SQL statements are not well explained, but the output might be understandable):
    enq TX  locked row
    The first, which queries V$SESSION_WAIT and V$SESSION, shows the wait event (on 10g and above, provides a better clue as to the reason session is waiting), the number of seconds waiting, SQL_ADDR and SQL_HASH_VALUE (may be used to find the SQL statement the session submitted), and details potentially describing the object being waited on, the specific absolute data file number, the block number, and the row within the block (DBMS_ROWID.ROWID_CREATE may be used to generate a ROWID to use to query the table in order to determine the actual contents of the row being waited on). The definition of P1, P2, and P3 vary by the type of wait event. In this case, lock mode and lock type for the waiting session may be derived from the P1 value.
    The second, which queries V$LOCK and V$SESSION, shows the two sessions involved in the lock. SID 150, in all cases is blocking SID 143 (as indicated by the BLOCK column). The other columns returned may be used to determine the SQL statements executed by each session (the SQL statement should have retrieved SQL_ADDR also on 10g and above), and the type of locks involved by both sessions.
    Other examples:
    Thorough example of using the information from V$LOCK:
    http://jonathanlewis.wordpress.com/2008/02/06/trouble-shooting-2/
    "How do you find out who is locking a specific row in a table?"
    http://www.jlcomp.demon.co.uk/faq/row_locker.html
    "Enqueue Waits and Locks" by Kyle Hailey:
    http://www.nocoug.org/download/2006-08/unit5_enqueues.ppt
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Session Ids

    Hi,
    How do I store the session ids of the stateful session beans.Their type is void.How can I persist them in the local database?
    Regards
    Bhavana

    HI
    GOOD
    GO THROUGH THIS LINK,I HOPE THIS WILL GIVE YOU SOME IDEA TO SOLVE YOUR PROBLEM
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/56fbae90-0201-0010-518d-a256d833508e
    http://wendtstud1.hpi.uni-potsdam.de/sysmod-seminar/SS2005/elaborations/02_Clustering-Concept_of_the_SAP_web_AS.pdf
    http://www.ssw.uni-linz.ac.at/Teaching/Lectures/SpezialLVA/Loeffler/SS2005/j2ee_introduction_and_practice.pdf
    THANKS
    MRUTYUN

  • Problem of creating session initialisation block

    Hi,
    I'm using OBIEE11.6, I want to new a session initialisation block, and I select Database as the Data Source Type,select the Default initialisation string radio button,but when I select the connection pool, the there is no connection pool in right pane,I have created two connection pools by oracle DB before,
    but now I can't select the connection pool,the Select button is gray and can't click.
    But when I new a repository initialisation block, I can select the connection pool.
    so I don't know why.
    If you know please help me.
    Thank you!

    Thanks MK,
    I have tested that use the connection pool which with some tables it warn me it will impact performance.
    but I use the connection pool which with no tables it also warn me it will impact performance.
    so I don't know how to create Independent connection pool that you mean.

  • Deadlock occur session is blocking its own session

    i'm getting deal lock in my process , this is comming when i'm trying to calculate ID/primary key valuce
    from ID table , we maintain a table for PK each time we need we read the value and increament the value by one for the next procuess . but here u seen for deadlock blocker and witer is same
    and dead lock i comming at same line every time
    line is select ... from id table for update of id ;
    please help me why it is comming
    Trace file:ORACLE.GPRD.OSDI.TRACE.T1930834.G0010010
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00020017-000282b2 18 19 X 18 19 X
    session 19: DID 0001-0012-00000035.session 19: DID 0001-0012-00000035
    Rows waited on:
    Session 19: obj - rowid = 00001209 - AAAEiHAA0AAACCyAAd
    (dictionary objn - 4617, file - 52, block - 8370, slot - 29)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    Trace file:ORACLE.GPRD.OSDI.TRACE.T1930834.G0010012
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00140021-0002d6d0 20 22 X 20 22 X
    session 22: DID 0001-0014-00002734.session 22: DID 0001-0014-00002734
    Rows waited on:
    Session 22: obj - rowid = 00001209 - AAAEiHAA0AAACCyAAd
    (dictionary objn - 4617, file - 52, block - 8370, slot - 29)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    Trace File:ORACLE.GPRD.OSDI.TRACE.T1930904.G028000A
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00120026-00028b60 12 14 X 12 14 X
    session 14: DID 0001-000C-00002913.session 14: DID 0001-000C-00002913
    Rows waited on:
    Session 14: obj - rowid = 00001209 - AAAEiHAA0AAACCyAAd
    (dictionary objn - 4617, file - 52, block - 8370, slot - 29)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00120026-00028b60 12 14 X 12 14 X
    session 14: DID 0001-000C-00002913.session 14: DID 0001-000C-00002913
    Rows waited on:
    Session 14: obj - rowid = 00001209 - AAAEiHAA0AAACCyAAd
    (dictionary objn - 4617, file - 52, block - 8370, slot - 29)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    Trace file:ORACLE.GPRD.OSDI.TRACE.T1930834.G005000C
    Resource Name process session holds waits process session holds waits
    TX-0007002c-000282f7 14 13 X 14 13 X
    session 13: DID 0001-000E-00000023.session 13: DID 0001-000E-00000023
    Rows waited on:
    Session 13: obj - rowid = 00001209 - AAAEiHAA0AAACCyAAd
    (dictionary objn - 4617, file - 52, block - 8370, slot - 29)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    Trace File:ORACLE.GPRD.OSDI.TRACE.T1931520.G002000D
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-0005000a-0002d905 15 16 X 15 16 X
    session 16: DID 0001-000F-00004F28.session 16: DID 0001-000F-00004F28
    Rows waited on:
    Session 16: obj - rowid = 00001209 - AAAEiHAA0AAACCyAAd
    (dictionary objn - 4617, file - 52, block - 8370, slot - 29)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    trace File:ORACLE.GPRD.OSDI.TRACE.T1930834.G001000E
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00170013-000284f7 16 17 X 16 17 X
    session 17: DID 0001-0010-00000039.session 17: DID 0001-0010-00000039
    Rows waited on:
    Session 17: obj - rowid = 00001209 - AAAEiHAA0AAACCyAAd
    (dictionary objn - 4617, file - 52, block - 8370, slot - 29)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    Trace File:ORACLE.GPRD.OSDI.TRACE.T1930834.G0010011
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00140026-0002d681 19 20 X 19 20 X
    session 20: DID 0001-0013-00000013.session 20: DID 0001-0013-00000013
    Rows waited on:
    Session 20: obj - rowid = 00001209 - AAAEiHAA0AAACCyAAd
    (dictionary objn - 4617, file - 52, block - 8370, slot - 29)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    --------------------------------------------------------------------------------

    Dear
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00020017-000282b2 18 19 X 18 19 X
    session 19: DID 0001-0012-00000035.session 19: DID 0001-0012-00000035
    Rows waited on:
    Session 19: obj - rowid = 00001209 - AAAEiHAA0AAACCyAAd
    (dictionary objn - 4617, file - 52, block - 8370, slot - 29)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    SELECT NEXT_ID, UPDATE_DT_TIME, UPDATE_USER_ID FROM ID_V WHERE UPPER(TABLE_NAME)
    Trace file:ORACLE.GPRD.OSDI.TRACE.T1930834.G0010012 You are getting TX (Transaction lock) on X(exclusive) mode. This is either a row locking or a PK/UK enforcement.
    If you post your code here and if you are using autonomous transaction, I might be able to change a little bit your code to avoid using autonomous transaction and hence to avoid your deadlock which, in contrast to what has been said here by one of the contributors, has to be solved and has not to be let in the hand of Oracle which will select arbitrarly a victim session and kills it to release the lock.
    Best Regards
    Mohamed Houri

  • Determine blocking sessions and blocked sessions in 9iR2

    Hi,
    Running 9.2.0.7 on Solaris 2.
    We are trying to develop a query that can show us the blocked sessions and the session causing it. I have one working for 11 but for 9i, its a little more trickier. I am running these two so far:
    select s1.username || '@' || s1.machine || ' ( SID=' || s1.sid ||
           ' )  is blocking ' || s2.username || '@' || s2.machine || ' ( SID=' ||
           s2.sid || ' ) ' AS blocking_status
      from gv$lock l1, gv$session s1, gv$lock l2, gv$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;
    select do.object_name,
           row_wait_obj#,
           row_wait_file#,
           row_wait_block#,
           row_wait_row#,
           dbms_rowid.rowid_create(1,
                                   ROW_WAIT_OBJ#,
                                   ROW_WAIT_FILE#,
                                   ROW_WAIT_BLOCK#,
                                   ROW_WAIT_ROW#)
      from gv$session s, dba_objects do
    where sid = 543
       and s.ROW_WAIT_OBJ# = do.OBJECT_ID;Reason I need this is that lately we have been getting a lot of DEADLOCKS and we want to determine why this is happening a lot now and we want to start with who it is and what objects are causing it....any suggestions?

    mbobak wrote:
    There are a few critical pieces to interpreting a deadlock trace file. First, to be clear, you're getting ORA-00060, not ORA-04020 (which is a library cache deadlock), correct?
    If so, the tracefile will contain a deadlock graph. This will show the type of enqueue involved (TM or TX are the likely candidates), and the modes that locks and requests are being made.
    Then, there's the SQL which encountered the deadlock, and finally, the other SQL involved in the deadlock.
    All the above information is in the deadlock trace file.
    Using it, you ought to be able to determine root cause of the deadlock.
    If you need help understanding it, post here. If you post the deadlock graph, make sure you use code tags, or it will be unreadable.Yes we are getting the ORA-00060. This is what we get exactly from the AppTeam from the App:
    Available exception message: iims.ge.common.exception.IIMSTechnicalException : ORA-00060: deadlock detected while waiting for resourceFrom our latest Deadlock occurence we got a LMD Trace file generated. We can see the DeadLock graph and its SQL. We the enqueue of TX and it's modes. Basically everything you asked for we see it in the trace file. What we want to see is what is causing it or who is so we can fix it. Maybe I am not reading the trace file correctly. I appreciate your assistance in helping me interpret the trace file. As requested, here is the trace file.
    Dump file /var/local/oracle/logs/ora_prod_can1_lmd0_4432.trc
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning and Real Application Clusters options
    JServer Release 9.2.0.8.0 - Production
    ORACLE_HOME = /opt/oracle/9.2.0
    System name:    SunOS
    Node name:      can-clust01
    Release:        5.9
    Version:        Generic_118558-36
    Machine:        sun4u
    Instance name: ORA_PROD_CAN1
    Redo thread mounted by this instance: 0 <none>
    Oracle process number: 5
    Unix process pid: 4432, image: oracle@can-clust01 (LMD0)
    *** SESSION ID:(4.1) 2010-08-15 08:07:02.736
    open lock on RM 0 0
    *** 2010-08-15 08:07:31.353
    open lock on RM 0 0
    *** 2010-08-16 11:17:21.469
    user session for deadlock lock 40972c9c0
      pid=50 serial=6956 audsid=189500961 user: 61/IIMS_UWR
      O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.1] :
    BLOCKED 40972c570 5 [0x90014][0x19bb82],[TX] [131094,2] 1
    BLOCKER 40972bb98 5 [0x90014][0x19bb82],[TX] [65586,6177] 0
    BLOCKED 40972c9c0 5 [0x110014][0x12ec40],[TX] [65586,6177] 0
    BLOCKER 40972ba18 5 [0x110014][0x12ec40],[TX] [131094,2] 1
    user session for deadlock lock 40972c9c0
      pid=50 serial=6956 audsid=189500961 user: 61/IIMS_UWR
      O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.2] :
    BLOCKED 40972c9c0 5 [0x110014][0x12ec40],[TX] [65586,6177] 0
    BLOCKER 40972ba18 5 [0x110014][0x12ec40],[TX] [131094,2] 1
    BLOCKED 40972c570 5 [0x90014][0x19bb82],[TX] [131094,2] 1
    BLOCKER 40972bb98 5 [0x90014][0x19bb82],[TX] [65586,6177] 0
    *** 2010-08-16 11:17:42.495
    user session for deadlock lock 4098bcd08
      pid=59 serial=981 audsid=189501588 user: 61/IIMS_UWR
    O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.3] :
    BLOCKED 41228b128 5 [0x70001][0x178a52],[TX] [131100,2] 1
    BLOCKER 4098bade8 5 [0x70001][0x178a52],[TX] [65595,583] 0
    BLOCKED 4098bcd08 5 [0x130025][0x1475c9],[TX] [65595,583] 0
    BLOCKER 412275b78 5 [0x130025][0x1475c9],[TX] [131100,2] 1
    user session for deadlock lock 4098bcd08
      pid=59 serial=981 audsid=189501588 user: 61/IIMS_UWR
      O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.4] :
    BLOCKED 4098bcd08 5 [0x130025][0x1475c9],[TX] [65595,583] 0
    BLOCKER 412275b78 5 [0x130025][0x1475c9],[TX] [131100,2] 1
    BLOCKED 41228b128 5 [0x70001][0x178a52],[TX] [131100,2] 1
    BLOCKER 4098bade8 5 [0x70001][0x178a52],[TX] [65595,583] 0Let's see what we can get out of this now :)

  • How can i get list of Session Ids or SessionObjects present in appl server

    hi,
    i want to explicitly kill the sessions of the logged in persons from an application server instead of we waiting for the server to invalidate them once their time is out.
    can i get the list of all the session object avaliable in the sever at that perticular moment?
    regards
    sowjanya

    Hi!
    1.getIds() in javax.servlet.http.HttpSessionContext
    can be used but it is Deprecated.
    2.getIds() in javax.net.ssl.SSLSessionContext
    Returns an Enumeration of all session id's (you cant use this in this case)
    also in weblogic(BEA)change request No: CRS 45879 and 47878:
    supports methods like:
    public static boolean invalidateAll(HttpServletRequest req);
    check out there.
    Thanks,
    Ramu

Maybe you are looking for