Query to get the blocker and holder info

Hi All,
I have framed the following query to get the blocker and holder info.I intend to use this query in a auto-generated mail which executes every 15 mins
I have put an outer join on the holder because the holder query might have been executed at the time the auto mail configuration fires this query
I am not a dba and was apprehensive is there is some mistake in the logic of my query. I was also expecting to join v$sql_bind_capture using sql_hash_value and sql_address just the way in which I have joined v$sqlarea
Looking forward to your kind help in vetting the below query
Select distinct waiting_session,
dba_waiters.holding_session,
decode(to_char(session_waiting_info.STATE),'0','waiter is currently waiting','-2','duration of last wait by waiter is unknown','-1','waiter waited for a short time',' waiter waited long time') "waiters waiting state",
decode(session_waiting_info.WAIT_TIME,0,'waiter waiting') "waiters last wait time",
decode(to_char(session_holding_info.STATE),'0','holder is currently waiting','-2','duration of last wait by holder is unknown','-1','holder waited for a short time','holder waited long time') "holders waiting state",
decode(session_holding_info.WAIT_TIME,0,'waiter waiting') "holders last wait time",
sql_waiting_info.sql_text "query of the waiter",
sql_holding_info.sql_text "query of the holder",
session_waiting_info.STATUS "waiting STATUS",
session_holding_info.STATUS "holding STATUS",
session_waiting_info.process "waiting process",
session_waiting_info.PROGRAM "waiting PROGRAM",
session_holding_info.process "holding process",
session_holding_info.PROGRAM "holding PROGRAM",
session_waiting_info.ROW_WAIT_OBJ# "waiting object",
session_waiting_info.ROW_WAIT_ROW# "waiting row",
session_holding_info.ROW_WAIT_OBJ# "holding object",
session_holding_info.ROW_WAIT_ROW# "holding row",
session_waiting_info.BLOCKING_SESSION_STATUS "waiting session status",
session_holding_info.BLOCKING_SESSION_STATUS "holding session status",
session_waiting_info.username "holding os username",
session_holding_info.username "waiting os username",
session_waiting_info.MACHINE "waiting MACHINE",
session_waiting_info.TERMINAL "waiting TERMINAL",
session_holding_info.MACHINE "holding MACHINE",
session_holding_info.TERMINAL "holding TERMINAL",
session_waiting_info.TYPE "waiting TYPE",
session_holding_info.TYPE "holding TYPE"
from dba_waiters,
v$session session_holding_info,
v$session session_waiting_info,
v$sqlarea sql_waiting_info,
v$sqlarea sql_holding_info
Where dba_waiters.waiting_Session = session_waiting_info.sid
and dba_waiters.holding_Session = session_holding_info.sid
And session_waiting_info.sql_hash_value = sql_waiting_info.hash_value
And session_waiting_info.sql_address = sql_waiting_info.address
and session_holding_info.sql_hash_value = sql_holding_info.hash_value(+)
And session_holding_info.sql_address = sql_holding_info.address(+)
and dba_waiters.mode_held <> 'None'
Regards,
Vishal
Edited by: user11924113 on Feb 18, 2011 2:39 AM

Query to track the holder and waiter info
People who reach this place for a similar problem can use the above link to find their answer
Regards,
Vishal

Similar Messages

  • Function to get the layout and variant info of a report

    Hi ,
    I have report zmm4. I have created a variant 'var1' .
    The output format of the report is defined in the layout
    'lay1'. Which is the function which gives the complete info about the displaying coulmns of those layout ?  because I need replicate these functionality in EP .
    Please don't say USE "SAP transaction Iviews'.
    any hint is appreciated
    thanks
    pkiran

    Hi Prashant,
    Does your report should look like portal format? or is it ok if you show SAP report in portal then easiest would be having a layout variant in the report selection.
    Assuming you are using ALV display. Specify the layout variant 'lay1' and save the variant 'var1'.
    Create Iview using SAP Transaction Iview and pass the  Tcode  - 'Start_Report'
    Application Parameters - D_SREPOVARI-REPORT=ZMM4 & D_SREPOVARI-VARIANT = VAR1.
    Choose option process first screen.
    Other suggestion would be to create a function module which is RFC enabled and pass the report values in the specified format to the FM output table and use SAP RFC IVIEW and report would look in portal format.
    You can also use com.sap.pct.srv.portaldataviewer par file and choose PortalALVTemplate. PortalALVTemplate is FM in R3 and gives u an idea how you can present the ALV report in Portal.
    Hope this helps,
    Thanks,
    Praveen
    PS.Dont forget to reward points for useful/solved answers

  • Query to get the customer's ship_to  Phone# and Fax#

    Gurus -
    Can anyone of you please help me in getting a query to shows the phoen and fax# of the Customer's ship_to Phone# and fax#
    customers--> on Address tab ( click open) On next screen click on contacts tabe for SHIP_TO row , there under the communications section, there are telephone and fax details , i want to get those details.
    Please help me in getting the query to get the fax and phone#.
    Infact I am using the below query and still having issues getting the correct fax# ( using teh same logic for phone#)
    select DISTINCT DECODE(PHONE_AREA_CODE,NULL,'',PHONE_AREA_CODE||'-')||PHONE_NUMBER
    FROM hz_cust_accounts_all hca,
    hz_parties hzp1,
    hz_cust_acct_sites_all hcas,
    hz_cust_site_uses_all hcsu,
    hz_relationships hzr,
    hz_org_contacts hoc,
    hz_contact_points hcp,
    hz_parties hzp,
    hz_cust_accounts_all hca1,
    hr_locations hrl
    WHERE 1 = 1
    AND hca.party_id = hzr.object_id
    AND hzr.relationship_id = hoc.party_relationship_id
    AND hoc.party_site_id = hcas.party_site_id
    AND hcas.cust_acct_site_id = hcsu.cust_acct_site_id
    AND hzr.party_id = hcp.owner_table_id
    --AND hcp.primary_flag = 'Y'
    AND hzr.subject_id = hzp.party_id
    AND hzp.party_id = hca1.party_id(+)
    AND hzp1.party_id(+) = hca.party_id
    AND hcsu.location = hrl.location_id(+)
    and hcsu.site_use_id = hsu.site_use_id
    AND hcp.OWNER_TABLE_NAME IN ('HZ_PARTIES')
    AND hcp.CONTACT_POINT_TYPE IN ('PHONE')
    AND hcp.PHONE_LINE_TYPE = 'FAX'
    AND hcp.STATUS = 'A'
    and nvl (hcsu.status, 'x') = 'A'
    AND hcsu.SITE_USE_CODE = 'SHIP_TO'
    --and hcsu.site_use_id = hsu.site_use_id
    -- and hcsu.cust_acct_site_id = hsu.cust_acct_site_id
    --and hca1.cust_account_id = hca.cust_account_id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    What is the responsibility name? Form name and navigation path?
    You can determine the query from the form itself as follows:
    - Query the record(s)
    - Click on Help > Diagnostics > Examine
    - Under 'Block' field, select 'SYSTEM'
    - Under 'Field' field, select 'LAST_QUERY'
    You may also review the following note:
    Note: 259722.1 - HOWTO Determine Table and Column Name from a field in a form in 11i
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=259722.1

  • How to sync the album and track info that I entered into a CD using iTunes with the actual disc?

    Hello,
    I recently recorded some cover songs, and I imported them into iTunes. So, after entering the track info (track names and album art) into each track using "Get Info", I burned them to a CD. I was completely shocked that the track info and album artwork did not get inputted onto the CD. So, I entered the track info, but could not add the album artwork.
    How to add the album artwork is not as important a question. But it's one of my 2.75 questions.
    My other issue is that the info that I put on the CD using iTunes is only visible within iTunes. Therefore, I cannot get the track names elsewhere.
    My 2.5 questions are:
    1) How do I get the track and album info to display in Windows Explorer and Windows Media Player (and the touchscreen CD Player in the car)?
    2) How do I add digital album artwork to the CD (so that it shows on the touchscreen CD Player in the car - if iPods have the artwork and it shows on the car's screen, a CD should be able to show the artwork on the car's screen, when talking about limitations of the car)
    2.5) How do I make that artwork display across everywhere I plug that disc into?
    2.75) How do I ensure that when others import my CD, my artwork, track names, and album name also import from the CD?
    I have already burnt the CD, so I would prefer a way to tweak the properties of the already burnt CD rather than burning a whole new disc.
    Thank you!
    -Royce

    1) Metadata visibility in Windows Explorer and/or Windows Media Player depends on OS version and file type. The mp3 format has the widest support. As for the touchscreen CD Player in your car who can say? If it can play data discs the results will be better than with audio CD. If it can display CD text then this option should be selected when creating an audio CD.
    2) Artwork cannot be attached to the tracks on an audio CD. If your car system supports it all then it will be with data discs. Check the specifications of the system for the media types it can support on a data disc.
    2.5) Simply ensure the artwork is embedded in the tag.
    I have two scripts that can help with this, CreateFolderArt and EmbedFolderArt.
    The scripts have a slightly different purpose.
    CreateFolderArt ensures that every album folder ends up with a Folder.jpg image which is the art that iTunes already knows about. Side effects are that if artwork has been updated in iTunes the folder art should be updated also, and if any track from the album doesn't have embedded artwork it gets embedded.
    EmbedFolderArt was actually written for someone who already had various artwork images stored in the folders and wanted them added to their tracks, but not if iTunes had already downloaded a better quality image.
    2.75) Again, use a data disc format. Note that you should not be giving away copies of copyrighted material.
    Audio CDs are finalized, you cannot change any properties of them unless they are on rewritable media in which case you can erase the whole disc and start over.
    tt2

  • Query to get the details of Blocking and deadlock occurred for the Day

    Hi,
       I need a query to get the details of blocking and deadlock occurred for the day.

    You havent specified which version of SQL you are using which makes it difficult to give a solution. Assuming its latest versions , by default SQL Server (in any versions) doesnt track blocking information.
    You need to run some kind of queries/traces to capture blocking. The same goes with Deadlocks where majority of the DBA's enable trace flag 1222/1205 when they suspect deadlocks happening.
    Check this link -
    http://dba.stackexchange.com/questions/10644/deadlock-error-isnt-returning-the-deadlock-sql/10646#10646
    This link gives code to get historic deadlock information. I havent used it , I just googled to get that.
    That being said if you are looking for something to capture for the future check the below links.
    Check these links on how to setup extended events to capture deadlock and blocking.
    http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/12/21/an-xevent-a-day-21-of-31-the-future-tracking-blocking-in-denali.aspx
    http://blogs.msdn.com/b/sqlserverfaq/archive/2013/04/27/an-in-depth-look-at-sql-server-memory-part-2.aspx
    http://blogs.technet.com/b/mspfe/archive/2012/06/28/how_2d00_to_2d00_monitor_2d00_deadlocks_2d00_in_2d00_sql_2d00_server.aspx
    HTH
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Purchased Lion, installed it - once I log in - i get the curtain and message to hold the power button till it shuts down.  Worked with the disk repair utility - fixed permissions - still can't get past the "black curtain of death"  any suggestions?

    purchased Lion, installed it - once I log in - i get the curtain and message to hold the power button till it shuts down.  Worked with the disk repair utility - fixed permissions  to hold the power button till it shuts down.  Worked with the disk repair utility - fixed permissions - still can't get past the "black curtain of death"  any suggestions?
    My machine was patched to date 10.x.x.  I was lucky to get an internet connection and I selected the option to re-download Lion... its curruently being downloaded.  What if that doesn't work?
    Any thougths would be appreciated.
    Joe

    And you have a workstation? not a notebook. 
    Usually a driver or hardware, nothing that Disk utility will fix.
    You know of course what a Prohititory Sign is?
    prohibitory sign, kernel panic
    Forum devoted to Lion:
    Mac OS X v10.7 Lion Communities
    Tips and FAQs
    FAQ kernelpanic
    Resolving Kernel Panics
    Avoiding eliminating Kernel panics
    Lion App Compatibility Table - RoaringApps
    RoaringApps Mac OS X Lion Application Compatibility
    did you make sure your apps, drivers, and hardware support Lion?

  • Query for getting all function and procedure inside the packages

    hi All
    Please provide me Query for getting all function and procedure inside the packages
    thanks

    As Todd said, you can use user_arguments data dictionary or you can join user_objects and user_procedures like below to get the name of the packaged function and procedure names.
    If you are looking for the packaged procedures and functions source then use user_source data dictionary
    select a.object_name,a.procedure_name from user_procedures a,
                  user_objects b
    where a.object_name is not null
    and a.procedure_name is not null
    and b.object_type='PACKAGE'        
    and a.object_name=b.object_name

  • Query to get the Excise amount and basic amount based on the cst or vat tax

    Dear all,
                       I need a right query to get the basic amount ,excise amount and the tax amount based on the CST or VAT tax rate.The output should be like this,
    VAT
    goods excisabe at 1% - taxable amt(basic+excise for vat 1%)            tax amt
    goods excisable at 4%-   txable amt                                                       tax amt
    CST
    goods excisabe at 1% - taxable amt(basic+excise for CST 1%)            tax amt
    My problem will also be solved..if i am able to get  the basic value from base table OPCH itself............Since am using the PCH1 table to get the total basic amt...the values are duplicating.
    Regards,
    Shyam

    Hi Sowjanya,
    If you're simply trying to place a grand total, use the 'Insert Summary' option.
    Choose the measure field as the 'Field to Summarize' > Choose 'Sum' as the summary operation > Under 'Summary Location' choose 'Grand Total Report Footer'.
    -Abhilash

  • I have adobe15.8 safari  Mac i Life and I now get the blocked plug-in on the screen when I try to play video. Very frustrating

    I have adobe15.8 safari  Mac i Life and I now get the blocked plug-in on the screen when I try to play video. Very frustrating

    Hello audreyt92616051,
    The 'Blocked plug-in' message is from Safari (Apple), not Flash Player. This either means you have an older version of Flash Player, or internet plug-ins are disabled in the browser.  To verify internet plug-ins are enabled, Go to the Safari Preferences > Security and make sure the 'Internet Plug-ins' checkbox is marked.  The exact location and wording may differ depending on your version of Safari.
    To install the latest version of Flash Player, go to https://get.adobe.com/flashplayer and download the installer, taking note of the download location.  After the download completes, exit out of Safari (and any other app you have that may use Flash Player), go to the 'saved to' location, launch the installer, and follow the prompts to install Flash Player.
    Maria

  • I have adobe15.8 safari  Mac i Life and I now get the blocked plug-in on the screen when I try to play video. Very fustrating

    I have adobe15.8 safari  Mac i Life and I now get the blocked plug-in on the screen when I try to play video. Very frustrating.  What am I doing wrong??

    Could you please visit https://get.adobe.com/flashplayer and follow the instructions to get the latest version?  Once installed, please visit the Flash Player Help page and click the "Check Now" button.  Your Flash Player version should now be 17.0.0.134 which is the latest version.  That should fix the blocked plugin issue that you're running into.
    Thanks,
    Chris

  • Query to get parameter name and value after ran the conccurent program

    Hi All,
    Query to get the parameter name and value for completed concurrent program using the request id. can any one help me in this regard.
    Thanks,
    Red.

    Red,
    I have tried the same query and it works properly here.
    I have submitted "Purge Signon Audit data" concurrent program with "Audit Date" parameter set to 01-06-2009, and here is the query output:
    SQL> select request_id, phase_code, status_code,
    argument_text, argument1
    from fnd_concurrent_requests
    where request_id = '739664';
    REQUEST_ID P S ARGUMENT_TEXT        ARGUMENT1
        739664 C C 2009/06/01 00:00:00  2009/06/01 00:00:00Regards,
    Hussein

  • How do I get data off  my phone? when I plug phone into the wall and hold down the button i can get into photos and messages etc but when I plug into laptop it goes to recovery mode........therefore the data is not yet wiped? HELP!

    how do I get data off  my phone? when I plug phone into the wall and hold down the button i can get into photos and messages etc but when I plug into laptop it goes to recovery mode........therefore the data is not yet wiped? HELP! I got married last week on holidays and have not had a chance to save photos yet.

    Hello there stidhambr15,
    I was researching the issue you are having and recommend a couple of things. First it might be a good idea to reset the device following iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting found here http://support.apple.com/kb/ht1430
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't quite get the device going again, I recommend restoring the device.
    iTunes: Restoring iOS software
    http://support.apple.com/kb/ht1414
    Might even be a good idea to turn off the phone, reseat the SIM card, and turn it back on.
    iPhone and iPad: How to remove the SIM card
    http://support.apple.com/kb/ht5163
    iPhone 4 (GSM model)
    iPhone 4S
    Cheers,
    Sterling

  • Problem in Execute query on non-database block and database block together

    Hi All,
    In my form,i have
    1. First block is Non-database block with one non-database item.
    2. Second and third blocks are database blocks.
    Now the problem is that i want to perform execute-query for all the blocks.
    If the cursor is on the non-database item of 1st block and i clicks on the "Enter-query" then i am getting message " This function can not be performed here".
    If i click on the item of the database block and then clicks on the "Enter-query" and then "execute-query" it's working fine.
    But i don't want to do in this way.
    My cursor will be on the First block only and then it should perform execute-query.
    I am using this non-database item to copy value of this item to the item of the database block item.
    I think i make you understand about my problem.
    I am using forms 10g on Window xp.
    Please help me.

    Hi!
    Simply create a enter-query trigger on the non-database-block:
    begin
    go_block ( 'database_block' );
    enter_query;
    end;If your search criteria is in the non-database-item in the first block,
    you actually do not need the enter_query build-in.
    Just create a execute-query trigger on the first block like:
    begin
    go_block ( 'database_block' );
    execute_query;
    go_item ( :System.trigger_item );
    end;And in a pre-query trigger on the database-block copy the
    value of your seach item into the item you want to search for.
    Regards

  • Query to get the windows-user(os)

    Hallo,
    I have a windows operating system and on this system is oracle database with the
    spatial-option installed. Now I wanna create a trigger which writes in a table if
    a geometry is updated. In this table I wanna write the new geometry, the time of
    the update and the windows-user that logged on the windows operating system. I
    don't wanna know the database user.
    What is the sql-query to get the windows-user?
    Thanks Katrin

    As an alternative, use the SYS_CONTEXT function to get some of this info.
    oracle@fuzzy:~> sqlplus test/test@XE
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 2 16:32:53 2007
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> select sys_context('USERENV', 'HOST') Host,
      2         sys_context('USERENV', 'IP_ADDRESS') IP,
      3         sys_context('USERENV', 'OS_USER') OS_User,
      4         sys_context('USERENV', 'AUTHENTICATED_IDENTITY') Identity
      5    from dual;
    HOST    IP          OS_USER   IDENTITY
    fuzzy    127.0.0.2  oracle    test
    SQL>                                           More info at http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm#i1038176

  • Trying to get the Opening and Closing Balance, 0TOTALSTCK and 0VALSTCKVAL

    Hi Experts, Good Day.
    I am developing a query for Stock Balances, Using Custom cube created with copy from 0ic_c03.
    I am trying to get the Opening and Closing Balance, based on Non-Cumulative KF - 0TOTALSTCK and 0VALSTCKVAL.
    Both The KF's Behaviour for Exception Aggregat. = Last Value
    I am using VARIABLE OFFSET as -1 to get Opening Balance, and just restriction for Closing Balance based on 0CALMONTH
    Unfortunately i am getting data for the periods which does not have data in my Cube. It is taking the total value as closing balance for the periods which we don't have transaction in the cube.
    For Ex. I have data for 09.2010 & 10.2010 a particular material, when i enter 08.2010 as input i am getting the total value of the material.
    I hope you understand the problem and solution soon.
    I will give you more explanation if needed.
    Thanks in Advance....
    Have a great Day Ahead.....
    GopalN

    Hi GopaIN,
    can you explain us process you have done about initialization of data (2LIS_03_BX, cube compression)? it seams like there was data before 09.2010 and you load it with 2LIS_03_BX data source. That data is not in cube, but just used for update markers.
    Edited by: Sasa Todorovic on Mar 25, 2011 9:48 AM

Maybe you are looking for

  • How to load a pdf/xls/swf files in to a adf:popup

    hi my requirement is to open a pdf/xls/swf in a popup. howcan i get a poup with pdf/xls/swf files . presently i am using a servlet.I set the content type in the servlet as application/pdf and so on.. I am getting data as byte stream from the data bas

  • Sponsor portal and internal users

    Hi I have configured on our ISE to use AD-users as sponsors. And this works perfect. but I'm also trying to configure an internal user, for the sponsor portal. I Have configured it almost the same way so i don't understand why the ISE is reporting :

  • Time mismatch between controller and AP, why?

    Hello all, I have a lab setup with a Cisco vWLC deployed in VMWare ESXI and 2x 1131 APs,  The APs are failing to join the controller due to a certificate error. I have noticed that the time that APs are using is an hour out from the controller. The c

  • Replacement of FM CONVERT_DATE_INPUT

    hi,    i used the function module CONVERT_DATE_INPUT in my report program but it is flagged as obsolete. Please tell replacement for it.

  • Panels will not float or move

    The program seems to run fine except that I cannot move or float the panels. They move ever so slightly and lock in place when I attempt to drag them. The only way to get them back is to do a workspace reset. I am running Vista 32 bit, Nvidia 8600gt,