Sql of the blocker history

Hi
Oracle 10g.
Lets say, I experienced a database lock 2 hours ago and I want to find which sql statement was blocking others.
I know the sid of the blocker but I am unable to find the sql statement of the blocker.
Also, when I check enterprise manager top activity only shows the waiter.
I tried to run the queries from below link, but it only shows the information about the waiting session.
http://oraclue.com/2009/10/15/blocking-locks-history/
How can I find the sql statement of the particular sid from history ?

Ora_83 wrote:
Lets say, I experienced a database lock 2 hours ago and I want to find which sql statement was blocking others.
I know the sid of the blocker but I am unable to find the sql statement of the blocker.
Also, when I check enterprise manager top activity only shows the waiter.
I tried to run the queries from below link, but it only shows the information about the waiting session.
http://oraclue.com/2009/10/15/blocking-locks-history/
How can I find the sql statement of the particular sid from history ?Generally speaking, there is no way. There is no direct link available between the lock and the statement. Any SQL-driven solution to the probably is depending on luck, or a little guesswork, and may give no answer or a false positive. For a simple demo to make the point see: http://jonathanlewis.wordpress.com/2009/04/19/locking-sql/
Regards
Jonathan Lewis

Similar Messages

  • Want to change the SQL Server Agent Job History Text Files Location

    We have SQL Server 2014 installed on a couple servers, but they were not consistent on directory paths during the installs. I am trying to get the servers to all match.
    On one server, SQL Server the Agent Log and Job History files were being written to [H:\Data Root Directory\MSSQL12.MSSQLSERVER\MSSQL\Log].
    I want to change that to [H:\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log] to match the other server.
    I have ALREADY gone into SSMS - [SQL Server Agent] - [Properties] and changed the "Error Log " "Fle Name" to [H:\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\SQLAGENT.OUT].  And that is working great.
    In [SQL Server Configuration Manager] - [SQL Server (MSSQLSERVER)] - [Properties] - Startup Parameters entries have been changed to the new path (-d, -e, and -l), and under [Advanced] both Data Path and Dump Directory are pointing to the new path. 
    In [SQL Server Configuration Manager] - [SQL Server Agent (MSSQLSERVER)] - [Properties] - [Advanced] Dump Directory is pointing to the new path. 
    However, the job's History text files are still being written to the old path.
    There is no setting in the Jobs or the Maintenance Plans that controls the history file location.
    I have searched the registry and changed three settings from the old path to the new path.  The registry does NOT contain any more references to the old path.
    I rebooted the server, but when the jobs run their history text files are still be written to the old path.
    Does anybody have any ideas??   Thanks

    I checked the [Job] - [Step] - [Advanced ] - "Output File", and the field is blank.
    I then reviewed all the tabs and left menu items in the Job...I cannot find any where the references the old path.
    I then went to the Maintenance Plan and checked every thing there.  Still cannot find what is referencing this old path.
    SQL Server is also still writing xel files to this old path...if that offers any clues.
    The text file being generated is the recap of the Job run.  Starts with this:
    Microsoft(R) Server Maintenance Utility (Unicode) Version 12.0.2430
    Report was generated on "xxxxxxxxxxxxxxx".
    Maintenance Plan: SQL_Backups_Log
    Duration: 00:00:03
    Status: Succeeded.
    Details:
    Thanks for the ideas....

  • Can you block the clear history function on safari?

    how do you block the clear history function and is it possible to limit the number of places visited in the history?

    I don't believe that you can "block" the clear history function but you can set the limit for the number of places visited in history.
    I don't know what OS or Safari versions you are using but select the appropriate version of "Safari Enhancer" at the authors website.
    http://www.lordofthecows.com/safari_enhancer.php

  • Where can I see the 'Transaction History assignment block'

    Thanks for your information.
    context , help for Linking Business Transactions:
    You can use this function to display business transactions that are linked with other business transactions. This means that you can view all the transactions connected with a business transaction, in the Transaction History assignment block.
    In addition to the transaction history at header level, you can also display the transaction history in service and sales transactions at item level.

    Hi Robert,
    If I'm using CRMD_ORDER, where can I do the setting?
    Thanks very much for your information.
    Best regards,
    Anders

  • SQL Timeouts and Blocking Locks

    SQL Timeouts and Blocking Locks
    Just wanted to check in and see if anyone here has feedback on application settings, ColdFusion settings, JBOSS settings or other settings that could help to limit or remove SQL Timeouts and blocking locks on SID's.
    We're using MS SQL 2000 with JBOSS and IIS5.
    We've been seeing the following error in our logs that starts blocking locks in SQL:
    java.sql.SQLException: [newScale] [SQLServer JDBC Drive] [SQLServer] Lock request time out period exceeded.
    Once this happens, we're hosed until we remove the blocking SID in SQL.  These are the connections to the application.
    Any feedback would be great.  Thanks!

    Hi
    This is your exact solution:
    Select a.username, a.sid, a.serial#, b.id1, c.sql_text
    From v$session a, v$lock b, v$sqltext c
    Where b.id1 in( Select distinct e.id1
    from v$session d , v$lock e
    where d.lockwait = e.kaddr ) and
    a.sid = b.sid and
    c.hash_value = a.sql_hash_value and
    b.request =0;
    Thanks
    Sarju
    Oracle DBA
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by I'm clueless:
    Can someone give me the SQL statement to
    show if there are any blocking database locks and if so - which user is locking the Database?
    Thanks in Advance<HR></BLOCKQUOTE>
    null

  • SQL Server Agent - Job History not being recorded (SQL Server 2005)

    I have been trying to get to the bottom of an issue with SQL Server Agent not recording any job history. I am using SQL Server 2005 on a single Windows Server 2008 machine (i.e. no other domain controllers/active directory servers).
    The SQL Server Agent service is configured to 'Log On As' NT user account 'sqlagent'. The jobs themselves are executed successfully (all 'Transact-SQL' type steps actually use the 'sa' account) however the there is no actual job history to be found for any
    of the jobs -- in the SQL Activity monitor, the 'Last Run Outcome' is always 'Unknown' and the 'Last Run' date is always 'Never' for all jobs; in the SQL Job History Viewer there are no entries for any instances of a job being executed.
    The 'sqlagent' NT user account ia a member of the 'Administrators' NT group; the 'Administrators' group appears under Security > Logins on the database server. I have another server that also uses the same setup with a 'sqlagent' NT user account, on that
    database server the 'sqlagent' user account appears under Security > Logins and the SQL job history works correctly. I have attempted to add the 'sqlagent' to the Logins on the affected server using the SQL Server Surface Area configuration but this operation
    returns an error, detailed below.
    Additionally, I have attempted to use the built-in NT system account 'NETWORKSEVICES' to run the SQL Agent Service but this also results in exceptions in the error log and no job history being recorded. The entries in the error logs are very similar to those
    from the 'sqlagent' NT user account but instead the user is referred to as 'NT AUTHORITY\ANONYMOUS LOGON' in the error logs, again these are detailed below.
    Many thanks in advance for anyone's time and help with this issue!
    Arthur
    The following errors are raised in SQL Server Agent > Error Logs each time a job is executed:
    Date 11/11/2012 18:30:01
    Log SQL Agent (Current - 11/11/2012 18:30:00)
    Message
    [298] SQLServer Error: 18452, Login failed for user ''. The user is not associated with a trusted SQL Server connection. [SQLSTATE 28000]
    Date 11/11/2012 18:30:01
    Log SQL Agent (Current - 11/11/2012 18:30:00)
    Message
    [382] Logon to server 'XXXXXXXX' failed (ConnAttemptCachableOp)
    If the SQLAgent service is configured to use the NT system account 'NETWORKSERVICE' then the following errors are returned instead:
    Date 29/10/2012 18:30:15
    Log SQL Agent (Archive #1 - 29/10/2012 18:38:00)
    Message
    [298] SQLServer Error: 18456, Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [SQLSTATE 28000]
    Date 29/10/2012 18:30:15
    Log SQL Agent (Archive #1 - 29/10/2012 18:38:00)
    Message
    [382] Logon to server 'XXXXXXXX' failed (ConnAttemptCachableOp)
    I have tried granting the 'sqlagent' NT user account with SysAdmin Server Role privaledges using the SQL Server User Provisioning tool in SQL Server Surface Area Configuration, but this always throws the following, similar error:
    Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Error: 18452)
    ===================================
    Login failed for user ''. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18452&LinkId=20476
    Server Name: 127.0.0.1,1344
    Error Number: 18452
    Severity: 14
    State: 1
    Line Number: 65536
    Program Location:
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at sqlprov.SysAdminServerRole.ProvisionInstance(Instance instance, String userName)
       at sqlprov.ProvisionTask.Provision(Instance instance, String userName)
       at sqlprov.MainForm.ProvisionTasks()

    Hi Rama,
    Thanks for your reply. I have run the query you specified and can see only one entry with "NTLM" in the auth_scheme column, all of the rest have "SQL". It figures that the entry with "NTLM" is relating to the one NT user account that can successfully log
    in to the service (as mentioned in my reply to Nag above, this is the NT user account that installed the service on the machine). I have also executed the same query on the other machine that I mentioned in my original post and this contains two "NTLM" entries,
    I'd assume that these relate to the NT user that installed the software and the correctly working "sqlagent" NT user account that is correctly logging the job history on that machine.
    I think the problem is very much to do with granting access to new NT user accounts, as per the KB article that you have quoted above. In this case, it is not relating to scenarios 1 or 2 as these relate to SQL Server logins and this issue is about a Windows
    Authentication login. As I mentioned to Nag above, I am unable to grant any NT user accounts with access to the service however the NT accounts are all defined locally on the same machine as the SQL server is installed (i.e. there is no domain controller,
    active directory controller, etc) so I don't understand how the Windows login cannot be verified.
    Any further advice on the issue would be greatly appreciated, please let me know if there is any more information I can provide to help diagnose the problem.
    Many thanks!
    Arthur

  • How to make the ERP orders visible in the interaction history????

    Hi All
    I am working on CRM 7.0, I am not able to find the ERP Orders created for business partners under the interaction history assignment block.  How to make it visible
    Regards
    Jacopo Francoise

    Check class CL_CRM_IC_IHISTSEARCH_IMPL (the view controller's class), method SET_ALLOWED_BT_OBJECT_TYPES, you'll see these values hard-coded.
    Allowed Business object types:
    gc_object_type-businessactivity TO me->gt_object_type, " BUS2000126
    gc_object_type-service TO me->gt_object_type, " BUS2000116
    gc_object_type-lead TO me->gt_object_type, " BUS2000108
    gc_object_type-sales TO me->gt_object_type, " BUS2000115
    gc_object_type-complaint TO me->gt_object_type, " BUS2000120
    gc_object_type-task TO me->gt_object_type, " BUS2000125
    New from CRM 7.0
    gc_object_type-opportunity TO me->gt_object_type, " BUS2000111
    gc_object_type-incident TO me->gt_object_type, " BUS2000223
    gc_object_type-problem TO me->gt_object_type, " BUS2000224
    gc_object_type-contract_sales TO me->gt_object_type, " BUS2000121
    gc_object_type-contract_service TO me->gt_object_type. " BUS2000112
    Rupesh

  • Need to send success or failure message to BAPI of SQL query action block

    Hi All,
    I need to send success or failure message(i.e. 1 or 0) to BAPI which has been called below sql query action block in transaction
    Here in SAP, i have created on BAPI with one import parameter and one export parameter.
    In the sql query action block, it insert records in the database table. If it fail or success, that message(numeric value 1 or 0) has to send to SAP program through BAPI.
    I have created a SAP ABAP program which sends message to MII Message listener through RFC then in the process rule message it will call transaction, in transaction, sql query will insert records into database table.  if it success or fail, it will pass to BAPI. And i calling that BAPI in the same SAP ABAP Program to show in the output screen.
    Here the issues, i am not getting the value from BAPI which has send by the transaction in MII.
    SAP Jco, I have mapped in conf. links --> BAPI input with sql query sucess
    Thanks,
    Kind Regards,
    Praveen Reddy M

    Dear All,
    I am facing problem regarding completion notifications in Oraclr r12, when user click the upon completion generated notifications it can only be viewd once, second time user cannot view the notifications.
    I have find that fnd_file_temp table store this information and deleted it.
    Plz help me how to view this URL again.
    thanks
    regards,
    Zubyr

  • Where the INTERACTION HISTORY for the BP are stored in SAP CRM

    Hi all,
    We are using CRM 7.0 EHP1.
    In the WEBUI, under Accounts, we are seeing the Interaction history as seperate assignment block. Like wise we are seeing the same assignment block with details for Contact, Employee etc.
    Where these Interaction history is located in BP transaction for the same Account or Contact or Employee. If not, pl suggeest in which tables these info are stored in CRM.
    Regards
    ISWARI.

    Thanks Stephen for your response.
    Indeed we are not deleting entries in any environment, except for the sandbox, would be preposterous . This was just to know the dependencies on tables as we needed a quick answer and which is why we thought lets see if CRMD_PARTNER is the only table from where it comes from or is there another one.
    Is there a quick way to know about the table that a particular BOL object interacts with instead of checking the code in its handler class, which could be time consuming.
    Cheers
    Nikunj

  • Is there a way to restrict changing the browsing history in safari with ought restricting the entire application?

    Is there a way to restrict changing the browsing history in safari with ought restricting the entire application?

    For the iPod touch in your profile?
    Private browsing help here >  iOS:  Safari web settings
    For Safari for Mac OS X ...
    From your Safari menu bar click Safari > Private Browsing
    You can only block all history in Private Browsing, pages you visit, and autofill.

  • Where Clause in the block not executed

    I have this in the where clause in my block, I want to exclude managers. I have added a flag column IS_MGR to prs_employee_profile and I added this line to query(where IS_MGR <> 2) “ value 2 for true” and but it doesn’t work. prs_amp_profile is the emp table and this block is based on atn_emp_week , emp_id is a foreign key. all the conditions are working except for the one i added and it is still bring the records for the managers. Any body can tell me why the condition is not being forced.
    Original Where Clause
    1=1 AND (emp_id in (select id from prs_employee_profile where
    dpt_id in (select dept_id from prs_user_dept_priv where user_id = :global.usr)
    and emp_id = decode(:global.emp_user_flag, 1, id, :global.emp_id)
    and emp_sts_id in (select id from prs_employment_status where active_flag <> 0))
    OR :GLOBAL.GRP='ATN_ADM')
    After adding
    1=1 AND (emp_id in (select id from prs_employee_profile where IS_MGR <>2
    And dpt_id in (select dept_id from prs_user_dept_priv where user_id = :global.usr)
    and emp_id = decode(:global.emp_user_flag, 1, id, :global.emp_id)
    and emp_sts_id in (select id from prs_employment_status where active_flag <> 0))
    OR :GLOBAL.GRP='ATN_ADM')

         1=1
    AND (    emp_id in (select id
                          from prs_employee_profile
                         where IS_MGR!=2
                           And dpt_id in (select dept_id
                                            from prs_user_dept_priv
                                           where user_id = :global.usr
                           and emp_id = decode(:global.emp_user_flag, 1, id, :global.emp_id)
                           and emp_sts_id in (select id
                                                from prs_employment_status
                                               where active_flag!=0)
          OR :GLOBAL.GRP='ATN_ADM'
        )I don't know your table-structures, one possibility would be that :GLOBAL.GRP is ATN_ADM at testing for this overwrites the other conditions.
    I would try to check the condition in sql*plus, apply it to the block when its working.

  • Table name in which the trip history is stored.

    Hi All,
    I was trying to find out the table in which the trip history is stored but in vain could not. Can any one let me know the table name plz.
    Your help is very much appreciated.
    Thanks and Regards
    Sri

    FITV_REJECT                    Rejected Trips                            
    FTPT_IMR_SURFACE               IMR - Other Segments of Trip as Flights   
    FTPT_QT_ALTERN                 Quicktrip Trip Alternative                
    FTPT_QT_QTRIP                  Quicktrip Trip                            
    PTRV_ARCHIVE                   Administrative Table for Archived Trip Dat
    PTRV_BEIH_BEL                  Assignment of Receipts to a Subsidy for Tr
    PTRV_BEIH_TAG                  Assignment of Days to a Subsidy for Trips 
    PTRV_BEIH_WEG                  Assignment of Trip Segments to a Subsidy f
    PTRV_BEIHILFE                  Subsidies for Trips Home for Entire Separa
    PTRV_COMM_AMT                  Detail Data: Transfer to FM When Trip Save
    PTRV_COMM_ITM                  Header Data: Transfer to FM When Trip Save
    PTRV_F_FBLK                    Form Blocks of the Trip Costs Form        
    PTRV_F_FBLK_TXT                Form Blocks of the Trip Costs Form        
    PTRV_HEAD                      General Trip Data                         
    PTRV_PERIO                     Period Data of a Trip                     
    PTRV_REDUCTION                 Decision Fields: Change of Statutory Trip 
    PTRV_ROT_AWKEY                 Assignment of Trip Results to Posting Doc.
    PTRV_SADD                      Trip Statistics - Add. Receipt Data       
    PTRV_SBACKLOG                  Trip Statistics - Batch/Backlog Processing
    PTRV_SCOS                      Trip Statistics - Cost Assignment         
    PTRV_SHDR                      Trip Statistics - Trip Amounts            
    PTRV_SREC                      Trip Statistics - Receipts                
    PTRV_TRIP_CHAIN                Table of all Trip Destinations f. Processi
    PTRV_TRIP_DELETE               Trips Deleted in R/3 For Offline Travel Ma
    SFLTRIPBOK                     Individual Flight Bookings for a Flight Tr
    T702N                          Trip Provision Variants

  • How to display table name in the Record history

    Hi,
    I have developed a new custom form. When I click on the record history, it displays details like updated_by , update_Date.
    But it doesnt show the table name ( of the data block ). Is there any coding to be done to display the table name ?
    Regards,
    Suresh

    Sounds like some custom form for the eBusines-suite. Maybe you get an answer in an eBusiness-suite related forum, maybe here OA Framework

  • Frm-41380 error - cannot set the blocks query data source

    Fairly new forms so bare with me. I am creating a form based on one table. This table has one column that is a nested table.
    table name: szrtime
    table columns: szrtime_code, szrtime_styp_list
    szrtime_styp_list is a table of varchar2(1).
    main block is szvtime_block
    the block that contains the nested table is szvtime_styp_block
    I read that I could use a WHEN_NEW_RECORD_INSTANCE trigger on the main block to display the related nested table. I have tried the folllowing:
    Declare
    select_stmt Varchar2(512) ;
    Begin
    If :szvtime_block.szvtime_code Is not null Then
         select_stmt := '(SELECT column_value FROM TABLE ( SELECT szrtime_styp_list FROM szrtime WHERE szrtime_code = ''' || :SZVTIME_BLOCK.SZVTIME_CODE || '''))';
         Go_Block('SZVTIME_STYP_BLOCK' );
         Clear_Block ;
         message('select_stmt = '||select_stmt);
    Set_Block_Property( 'SZVTIME_STYP_BLOCK', QUERY_DATA_SOURCE_NAME, select_stmt ) ;
    Execute_Query ;
    Go_Block('SZVTIME_BLOCK') ;
    Else
    Go_Block('SZVTIME_STYP_BLOCK' );
    Clear_Block ;
    Go_Block('SZVTIME_BLOCK') ;
    End if ;
    End ;
    The result is the frm-41380 error.
    I have tried change the query data source type on the nested table block to Table or From-clause but did not help. The select statement that is valid and returns the correct result in Toad.
    Any suggestions on what to look for? Thank you.
    Todd

    > But what is giving me pause is that the user will be updating, deleting, and inserting
    into this table and, of course, the nested table column.
    It would give me pause, too. I've never used nested tables, so I poked around in Forms on-line help. In Forms 6i, it specifically states that Forms does not support the Nested Table structure.
    In Forms 10g help, it describes Nested Table structures, but says NOTHING about how a form would handle it. And that implies to me that it is still not supported. So good luck.
    In addition to creating the view, you may need to provide your own nested table updating procedures via a package on the server which your form can call. I know Forms supports passing pl/sql tables ("indexed by binary_integer"), so you could pass your nested table back and forth between the package and the form in that format.

  • Identifying the blocking Lock

    In one of our production DB we are experiencing huge bottlenecks due to locks. I am using OEM lock monitor to detect and identify the problematic lock. I am trying this out randomly as OEM list all the blocking locks. . Most times I am not able to analyse the problematic locks because of support calls from production. I just have time to kill the sessions and get the platform ready. Is there a script that I can use to identify the session that is blocking other sessions ? How do we do analysis during situations like this? At least I am interested in finding the root cause of the problem so we request the developers to fix it.
    - BMP

    &1 --><sid of any session>.if the sid provided is waiting for other sessions, it will show you the blocking session id.
    Try this one (Not tested):
    SELECT bs.username "Blocking User", bs.username "DB User",
    ws.username "Waiting User", bs.SID "SID", ws.SID "WSID",
    bs.sql_address "address", bs.sql_hash_value "Sql hash",
    bs.program "Blocking App", ws.program "Waiting App",
    bs.machine "Blocking Machine", ws.machine "Waiting Machine",
    bs.osuser "Blocking OS User", ws.osuser "Waiting OS User",
    bs.serial# "Serial#",
    DECODE (wk.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',
    wk.TYPE
    ) lock_type,
    DECODE (hk.lmode,
    0, 'None',
    1, 'NULL',
    2, 'ROW-S (SS)',
    3, 'ROW-X (SX)',
    4, 'SHARE',
    5, 'S/ROW-X (SSX)',
    6, 'EXCLUSIVE',
    TO_CHAR (hk.lmode)
    ) mode_held,
    DECODE (wk.request,
    0, 'None',
    1, 'NULL',
    2, 'ROW-S (SS)',
    3, 'ROW-X (SX)',
    4, 'SHARE',
    5, 'S/ROW-X (SSX)',
    6, 'EXCLUSIVE',
    TO_CHAR (wk.request)
    ) mode_requested,
    TO_CHAR (hk.id1) lock_id1, TO_CHAR (hk.id2) lock_id2
    FROM Gv$lock hk, v$session bs, v$lock wk, v$session ws
    WHERE hk.BLOCK = 1
    AND hk.lmode != 0
    AND hk.lmode != 1
    AND wk.request != 0
    AND wk.TYPE(+) = hk.TYPE
    AND wk.id1(+) = hk.id1
    AND wk.id2(+) = hk.id2
    AND hk.SID = bs.SID(+)
    AND wk.SID = ws.SID(+)
    AND (bs.username IS NOT NULL)
    AND (bs.username <> 'SYSTEM')

Maybe you are looking for

  • Creation of Database link and access the same plus Snapshot creation

    i want talk between two oracle server. i decided to go for snapshot creation with periodical refresh. For which i am having two oracle server's with different ip address located inside our office setup. I have created a database link between two serv

  • ERROR while syncing the Text Index

    Hi All, We are facing an issue while syncing the text index on the table, and the error is below, System error: Plsql job execution is failed with error code -20000 and error message ORA-20000: Oracle Text error: DRG-10017: you must be CTXSYS to do t

  • Moving home-unknown new address

    Hi all, I am hoping you can help with some advice. I currently live up north but have just been offered a job in London. I will be moving out at the end of April and for the first month I will be living in a serviced apartment. I have not yet found a

  • Console & Configuration for the WISM

    we are in the process of upgrading the wireless network in the office to use the Unified solution. We have converted the WLSE to the WCS and now in the process of configuring the WISM cards. 1st off we are having an issue with the console connection

  • Oracle 11.2 CLIENT CAN ACCESS THE ACFS File ???

    I am planning to configure Oracle 11.2 RAC lab set with following way. 1. Install Oracle 11.2 database RAC with two servers. 2. Install the Oracle 11.2 Client on two additional servers. 3. All the 4 servers are equipped with HBA Card and can reach to