Need command to kill the session:

Hi,
I've an oracle database running on sun solaris,users are using some application to work on oracle, we need to restrict this,i cant kill each and ecery session by seeing the program
pls suggest me

If you want disable to use "some application" then similar topic was discussed few day ago here: Re: restricting access to database
Message was edited by:
Ivan Kartik

Similar Messages

  • Regarding KILLING the session

    Hi..
    How to kill the session from the SQL * Plus ...please tell me anyone
    regards
    Yashavanth

    ALTER SYSTEM command. Refer to the [url http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_2013.htm#i2053602]Oracle® Database SQL Reference guide.
    However...
    1. This needs a SYSDBA priv. End-user and application schemas must NEVER be able to use the ALTER SYSTEM command directly. That will be a very serious and utterly silly security risk. (the type that can get you fired in the corporate world)
    2. Killing sessions is an exception. This should not be the run-of-the-mill thing. Why do you need to kill sessions from SQL*Plus? Are you sure that this is the best response to the problem you have? What is that problem? maybe we can offer better alternatives.

  • How to kill the session after the user exit the ADF application

    Dear all
    I have a problem
    The problem is the session still exist after the user close the application and the browser. I want to kill all sessions that is not active.
    This is my test scenario:
    1- I open IE and run my ADF application that is deployed on weblogic. http://192.168.100.17:7001/myapp/faces/login
    2- At the same time I issue this SQL command to view the sessions for user 'ADFUSER' - the "ADFUSER" is the schema user.
    SELECT USERNAME,STATUS FROM v$session
    WHERE USERNAME = 'ADFUSER';QUERY RESULT IS
    USERNAME                       MODULE                                           STATUS
    ADFUSER                         JDBC Thin Client                                 INACTIVE3- Now the user close the browser
    4- Run the SQL again and I notice that the session still exist
    SELECT USERNAME,STATUS FROM v$session
    WHERE USERNAME = 'ADFUSER'RESULT:
    USERNAME                       MODULE                                           STATUS
    ADFUSER                        JDBC Thin Client                                 INACTIVE5- now the user open the URL again http://192.168.100.17:7001/myapp/faces/login
    6-Run the SQL again , and I notice that the old session still exists and a new session created too.
    SELECT USERNAME,STATUS FROM v$session
    WHERE USERNAME = 'ADFUSER'RESULT:
    USERNAME                       MODULE                                           STATUS
    ADFUSER                        JDBC Thin Client                                 INACTIVE
    ADFUSER                        JDBC Thin Client                                 INACTIVE
    2 rows selected.and every time I login to the application , a new session is open and the old session still exist
    I do not know why this happens
    I want to kill old session when the user close the application.
    These sessions are cleared only when i restart the weblogic domain.
    here is some information about my development environment:
    Jdeveloper 11.1.2.3
    WebLogic Server Version: 10.3.5.0
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    thanks in advance

    Hi,
    for performance reasons you should not use dedicated user connections to the database. Instead you use JDBC data sources (default in JDeveloper for ADF BC) that you can configure the database connection pooling for. This means that your v$session will always show a set of active session, which however are shared among users. Assuming you use ADF BC, this is what happens
    - A user requests a data bound page
    - The ADF BC checks out an AM and connects to the database using one of the database connections in the pool
    ... user work here ...
    - user exits application
    - ADF BC returns AM to pool and passivates pending user state (if application is left with dirty transaction)
    - Database connection is available in pool as soon as AM released
    This also happens between requests. Long story cut short: v$session doesn't give you a true picture
    Frank

  • Killing the session in SAP

    HI,
       I need to kill the session , how to proceed .Please help me.
    Thaks
    Raghavendra

    Always activate the form before logging off from SAP.
    Next thing, if you still see the same problem check SM12 if there is any user trying to do with the form( but I am not sure this would be the case, as it is not locking of some table or something. Only thing is you might able to see the form in display mode atleast. Is that correct??)
    Check with Basis guys about the problem and see if they could help you out on this problem

  • I need command to change the file name in vi please.

    quick question
    i need command to change the file name in vi please.
    oldname = initprod12.ora new name = initprod2.ora

    SQL> startup;
    ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/usr/oracle/oradata/dbs/initprod2.ora'
    SQL> !
    [oracle@oracle2 ~]$ cd /usr/oracle/oradata/dbs
    [oracle@oracle2 dbs]$ ls
    ab_ASM2.dat  hc_prod12.dat  initASM2.ora init.ora orapw+ASM2
    hc_+ASM2.dat  hc_prod2.dat   initdw.ora     initprod12.ora  orapwprod12
    [oracle@oracle2 dbs]$ exit
    exit
    SQL> startup pfile='/usr/oracle/oradata/dbs/initprod2.ora';
    LRM-00109: could not open parameter file '/usr/oracle/oradata/dbs/initprod2.ora'
    ORA-01078: failure in processing system parameters
    if i change the name of initprod12.ora to initpord1.ora , will my problem be solved?

  • Kill the session Using Pl/sql Script

    Hi,
    I wrote a PL/SQL Script which kills the Specified Schema name..... the Script Run Successfully i got this output message "PL/SQL procedure successfully completed." But the Problem is in session status the status is in KILLED" state for more than 30 minutes.
    Please Advice Why the Session in Killed State for more than 30 minutes and please tell me how to kill the session immediate;
    I am Using Oracle DB 11g R1 and OS is Windows 2003 Server R2
    My Pl/sql Script
    SET SERVEROUTPUT ON;
    DECLARE
    KILLER1 V$SESSION.SID%TYPE;
    KILLER2 V$SESSION.SERIAL#%TYPE;
    CURSOR KILL_SESSION IS SELECT SID,SERIAL# FROM V$SESSION WHERE SCHEMANAME='NAME';
    BEGIN
    OPEN KILL_SESSION;
    LOOP
    FETCH KILL_SESSION INTO KILLER1,KILLER2;
    EXIT WHEN KILL_SESSION%NOTFOUND;
    DBMS_OUTPUT.put_line ('ALTER SYSTEM KILL SESSION '''||KILLER1||','||KILLER2||''' IMMEDAITE');
    EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION'||chr(39)||KILLER1||','||KILLER2||chr(39);
    END LOOP;
    IF (KILLER1 > 0)
    THEN
    EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION'||chr(39)||KILLER1||','||KILLER2||chr(39);
    END IF;
    CLOSE KILL_SESSION;
    END;
    Thank You
    Shan

    Hello,
    In fact you may use orakill it's an Oracle utility for Windows so as to Kill the thread corresponding
    to the session.
    It's equivalent to a kill -9 on Unix.
    Please find here a link about the use of orakill:
    http://articles.techrepublic.com.com/5100-10878_11-5224960.html
    Hope this help.
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Mar 27, 2010 5:17 PM

  • How can we Kill the session using Maxl

    Hi All,
    iam using EAS(11.1)
    i want to kill the sessions before loading the dimension and data into the cube , if any body connected or workinng on that server cube bcoz
    to avoid cube correptions
    how can i write MAXl for this scenario.???
    If any help,It would be appriciated.
    Thanks

    Hi,
    You can use the following maxl statements
    alter system kill request all;
    Which will kill all requests on the essbase server, also you can use
    alter system logout session all force;
    More information available at :- http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/maxl_altsys.htm
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Kill the Session in Apex

    Hi, How to kill the session in apex 4.1.
    We are running Application Security scan. When we run the scan we are getting error as Session Identifier not updated issue is coming.
    For that resolutions are Always generate a new session to which the user will log in if successfully authenticated. Prevent user ability to manipulate session ID.
    Do not accept session IDs provided by the user's browser at login.
    Is pagesentry function any helpful to create our own session?
    Basically what i want means when we logout the session we have to destroy the session and when we login we have to create new session.
    Thanks in advance

    Hi, How to kill the session in apex 4.1.
    We are running Application Security scan. When we run the scan we are getting error as Session Identifier not updated issue is coming.
    For that resolutions are Always generate a new session to which the user will log in if successfully authenticated. Prevent user ability to manipulate session ID.
    Do not accept session IDs provided by the user's browser at login.
    Is pagesentry function any helpful to create our own session?
    Basically what i want means when we logout the session we have to destroy the session and when we login we have to create new session.
    Thanks in advance

  • Kill the session

    HI please do quick help
    I am unable to kill the essbase database session. could you please help us how to kill that session. we all checked with services stop. but it is not resloved.
    Note: how to stop export in the mid if it is large file.
    Thanks
    Suresh Guvvala
    Visteon.com

    HI please do quick help
    I am unable to kill the essbase database session. could you please help us how to kill that session. we all checked with services stop. but it is not resloved.
    Note: how to stop export in the mid if it is large file.
    Thanks
    Suresh Guvvala
    Visteon.com

  • I need  to know  all the sessions  which  are closed abruptly

    Hi
    It happens that we abrupty close our sql sessions ( from toad,sqlplus etc).
    Is there some way to know the user , db , time off all these not normal closure ?
    which views do one needs to see?
    regards
    shubh

    Hi Shubh,
    As far as the Oracle database is concerned, a user who abruptly closes her SQL session is just disconnecting.
    See
    http://www.adp-gmbh.ch/ora/sql/trigger/logoff.html
    for a little more information; I'd do the implementation via AUDIT SESSION but a LOGOFF TRIGGER is an option (if you like to do the programming yourself (extra work...))
    Cheers,
    Colin

  • Need command to know the hardware model

    Dear all,
    I need a command which give me the result of configuration of servers, Hardisks information,
    raid information and processors capacity.
    Thanks

    You need several commands to display such informations.
    configuration of servers : # prtdiag
    Hardisks information : # echo "" | format
    RAID information : # raidctl (if you have a RAID HW controller)
    # metastat (if you use SVM or SDS)
    # zpool list (if you use ZFS file systems)
    processors capacity. : # psrinfo -v

  • Many, many times in a session, I get this: Mozilla Firefox (Not Responding). Frustration is setting in when I have to kill the computer, and start all over again. Anger is beginning a slow burn, too.

    Since the latest version (don't even ask me) was downloaded and installed, many times in a session when I am browsing the net, or opening a text document or a spreadsheet, flipping back and forth, I'll have to stop and sit for an indeterminate amount of time because up on the header, I'll get the message Mozilla Firefox (Not Responding). When looking down toward the front of the laptop, I note the hard drive is going full bore, whole hog, whatever you want to call it. Sometimes after repeated hitting the "enter" key, the program will catch up, and begin functioning again. Other times, because the program is stuck, the laptop will overheat, causing me to manually shut down, wait a while while the hard drive cools, then restarting. When I have to manually kill the session, I cannot, repeat CANNOT get the machine shutdown programs to work.
    What the hell is wrong with Firefox with this crap?

    Hello jesterabk, '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • Killing all sessions at once who are locking the objects

    Hello all,
    i am working in 9i Oracle RDBMS on AIX IBM OS
    most of the time we face locking issue and there comes more then different 50 sessions which locking different tables.
    here is my script to find out what sessions are locking what tables.
    set lines 200
    set pages 50000
    col SID for 99999
    col SERIAL# for 999999
    col username format a12
    col sql format a55
    col event format a50
    col program format a40
    col MINS for 9999
    col ID1 for 999999
    col object_name for a35
    col locktype for a8;
    select  /*+ ORDERED */ s.sid,s.serial#,s.status,round(s.last_call_et/60) MINS,s.program,l.ID1,d.object_name,d.object_type,l.type as locktype
    from v$lock l,v$session s, dba_objects d
    where l.sid = s.sid
    and l.ID1 = d.object_id
    and s.username = 'MULDMS'
    and last_call_et > 120 and l.type <> 'TX' order by s.status,MINS,l.ID1,l.type; and the out put it gives something like
      SID SERIAL# STATUS    MINS PROGRAM                                      ID1 OBJECT_NAME                         OBJECT_TYPE        LOCKTY
    8981    1069 ACTIVE       2 frmweb@Appsdms31 (TNS V1-V3)               30407 VH_BTN                              TABLE              TM
    1642     512 ACTIVE      15 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
      690    1057 ACTIVE      17 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
      699    1787 ACTIVE      17 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
      690    1057 ACTIVE      17 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
      690    1057 ACTIVE      17 [email protected] (TNS V1-V3)    30643 VT_CHECK_INOUT                      TABLE              TM
    10877     895 ACTIVE      18 [email protected] (TNS V1-V3)     28846 AM_DOCS                             TABLE              TM
    6654    1085 ACTIVE      18 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    1912    1655 ACTIVE      18 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    10877     895 ACTIVE      18 [email protected] (TNS V1-V3)     30407 VH_BTN                              TABLE              TM
    6654    1085 ACTIVE      18 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    1912    1655 ACTIVE      18 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    1754    1582 ACTIVE      18 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    10877     895 ACTIVE      18 [email protected] (TNS V1-V3)     30643 VT_CHECK_INOUT                      TABLE              TM
    6654    1085 ACTIVE      18 [email protected] (TNS V1-V3)    30643 VT_CHECK_INOUT                      TABLE              TM
    10708     982 ACTIVE      19 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    5428     855 ACTIVE      19 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    10708     982 ACTIVE      19 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    5428     855 ACTIVE      19 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    10278     897 ACTIVE      20 [email protected] (TNS V1-V3)     28846 AM_DOCS                             TABLE              TM
    6261    1056 ACTIVE      20 frmweb@appsdms12 (TNS V1-V3)               28846 AM_DOCS                             TABLE              TM
    6598    1413 ACTIVE      20 [email protected] (TNS V1-V3)     28846 AM_DOCS                             TABLE              TM
    1312    1000 ACTIVE      20 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    10278     897 ACTIVE      20 [email protected] (TNS V1-V3)     30407 VH_BTN                              TABLE              TM
    6261    1056 ACTIVE      20 frmweb@appsdms12 (TNS V1-V3)               30407 VH_BTN                              TABLE              TM
    1312    1000 ACTIVE      20 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    3521     717 ACTIVE      20 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    6598    1413 ACTIVE      20 [email protected] (TNS V1-V3)     30407 VH_BTN                              TABLE              TM
    6598    1413 ACTIVE      20 [email protected] (TNS V1-V3)     30643 VT_CHECK_INOUT                     TABLE              TM
    1312    1000 ACTIVE      20 [email protected] (TNS V1-V3)    30643 VT_CHECK_INOUT                   TABLE              TM
    9131    1002 INACTIVE     2 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TM
    4887    1040 INACTIVE     2 [email protected] (TNS V1-V3)     30455 VH_PSF                              TABLE              TM
      151    1982 INACTIVE     2 [email protected] (TNS V1-V3)     80224 RD_ENQEXD                           TABLE              TM
      846     988 INACTIVE     3 [email protected] (TNS V1-V3)    29228 GM_VIN                              TABLE              TM
    5364    1149 INACTIVE     3 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    9934     789 INACTIVE     3 [email protected] (TNS V1-V3)     30455 VH_PSF                              TABLE              TM
    7511    1092 INACTIVE     3 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TM
    3595    1104 INACTIVE     3 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TM
      846     988 INACTIVE     3 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TM
      945     670 INACTIVE     3 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TMand then i have to kill the session one by one . thaat is a tedious task to do.
    i want to modify this script which will give me all the kill statement and i just have to run it
    can someone help me in this regard as i am weak in sql/plsql
    thanks and many thanks

    >
    i want to modify this script which will give me all the kill statement and i just have to run it
    >
    Karthick's script will 'kill' the sessions but before you use that script you may want to read the docs about the KILL and DISCONNECT clauses.
    See the DISCONNECT SESSION and KILL SESSION clauses in the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_2013.htm#sthref4724
    >
    DISCONNECT SESSION Clause
    Use the DISCONNECT SESSION clause to disconnect the current session by destroying the dedicated server process (or virtual circuit if the connection was made by way of a Shared Sever).
    The IMMEDIATE setting disconnects the session and recovers the entire session state immediately, without waiting for ongoing transactions to complete.
    KILL SESSION Clause
    The KILL SESSION clause lets you mark a session as terminated, roll back ongoing transactions, release all session locks, and partially recover session resources.
    IMMEDIATE Specify IMMEDIATE to instruct Oracle Database to roll back ongoing transactions, release all session locks, recover the entire session state, and return control to you immediately.
    >
    For DISCONNECT the IMMEDIATE clause will recover the session state 'immediately'.
    Using KILL, even with the IMMEDIATE clause, you are telliing Oracle to roll back any ongoing transactions and that can take a lot of time.
    Make sure you are really doing the operation you want to do. If you want to get the locks released immediately you need to use 'DISCONNECT IMMEDIATE'.

  • Clear the entry for killed/sniped session in v$session

    Dear all,
    In our production database(11.2.0.1.0) running on windows 2008 server many client session showing inactive from last 4-5 hour and I want to kill those session because all sessions are dedicated so for this I created a resource plan set its idle time after certain interval session status is showing killed but it is not removing entries from v$session but our client demand is it must be clear from v$session so for this i was using DOS command taskkill utility to kill particular os process so I want to know what is the smartest way to do this.

    This is known behavior, not an issue.
    In a dedicated server environment when the session is killed and the rollback completes the process goes away so a join between v$session and v$process will fail. The v$session entry also usually goes away rather quickly, though I have seen cases where the v$session entry hung around till the instance was bounced. But normally Oracle will overlay the v$session entry with a new session using the same sid but a different serial# within seconds on a busy system.
    Mark @ http://dbaspot.com/oracle-server/40419-killed-sessions.html
    Metalink doc id 1023442.6 is also something confirming it.
    See also below link and last reply by Mr. Braj Kishore Mahto.
    http://dbaforums.org/oracle/index.php?showtopic=3039
    Regards
    Girish Sharma
    Edited by: Girish Sharma on Nov 21, 2012 5:35 PM
    So, what is best in this regard :
    ALTER SYSTEM DISCONNECT SESSION
    The ALTER SYSTEM DISCONNECT SESSION syntax is an alternative method for killing Oracle sessions. Unlike the KILL SESSION command which asks the session to kill itself, the DISCONNECT SESSION command kills the dedicated server process (or virtual circuit when using Shared Sever), which is equivalent to killing the server process from the operating system. The basic syntax is similar to the KILL SESSION command with the addition of the POST_TRANSACTION clause. The SID and SERIAL# values of the relevant session can be substituted into one of the following statements.
    SQL> ALTER SYSTEM DISCONNECT SESSION 'sid,serial#' POST_TRANSACTION;
    SQL> ALTER SYSTEM DISCONNECT SESSION 'sid,serial#' IMMEDIATE;
    http://www.oracle-base.com/articles/misc/killing-oracle-sessions.php#disconnect_session

  • How to kill the blocking session

    hi expert,
    when i m going to run the below query
    Update rcv_transactions_interface rti set rti.processing_mode_code ='BATCH'  where rti.interface_transaction_id = 3671265
    it gives the error:
    ORA-00054 resource busy and acquire with NOWAIT specified.
    i find out the blocking session by using the blow query;
    SELECT  a.SESSION_ID, a.SESSION_SERIAL#, min(A.SAMPLE_TIME) start_time,max(A.SAMPLE_TIME) end_time,a.inst_id, a.blocking_session,a.user_id,s.sql_text,A.EVENT,O.OBJECT_NAME,max(A.SAMPLE_TIME) - min(A.SAMPLE_TIME) 
    FROM GV$ACTIVE_SESSION_HISTORY a  ,gv$sql s, dba_objects o
    where a.sql_id=s.sql_id
    and A.CURRENT_OBJ# = O.OBJECT_ID
    and blocking_session is not null
    and a.user_id  != 0 -- exclude SYS user
    and a.sample_time > sysdate - 7
    and a.event = 'enq: TX - row lock contention'
    group by a.SESSION_ID, a.SESSION_SERIAL#, a.inst_id,a.blocking_session,a.user_id,s.sql_text,A.EVENT,O.OBJECT_NAME
    it gives the output
    SESSION_ID
    SESSION_SERIAL#
    START_TIME
    END_TIME
    INST_ID
    BLOCKING_SESSION
    USER_ID
    SQL_TEXT
    EVENT
    OBJECT_NAME
    MAX(A.SAMPLE_TIME)-MIN(A.SAMPLE_TIME)
    369
    45,849
    9/4/2013 8:29:33.119 AM
    9/4/2013 11:40:27.508 AM
    1
    554
    173
    SELECT POL.UNIT_PRICE   FROM PO_LINES POL  WHERE POL.PO_LINE_ID = :b1
    enq: TX - row lock contention
    PO_LINES_ALL
    +00 03:10:54.389000
    554
    18,872
    9/4/2013 8:29:33.119 AM
    9/4/2013 11:40:27.508 AM
    1
    365
    173
    SELECT POL.UNIT_PRICE,POL.QUANTITY,POL.UNIT_MEAS_LOOKUP_CODE,POL.AMOUNT   FROM PO_LINES POL  WHERE POL.PO_LINE_ID = :b1
    enq: TX - row lock contention
    JA_IN_PO_LINE_LOCATION_TAXES
    +00 03:10:54.389000
    572
    168
    9/4/2013 8:29:33.119 AM
    9/4/2013 11:40:27.508 AM
    1
    554
    173
    select line_location_id into :b0 from po_line_locations_all where line_location_id=:b1 for update of line_location_id
    enq: TX - row lock contention
    PO_LINE_LOCATIONS_ALL
    +00 03:10:54.389000
    581
    4,973
    9/4/2013 10:49:38.157 AM
    9/4/2013 10:50:39.259 AM
    1
    572
    173
    Update rcv_transactions_interface rti set rti.processing_mode_code ='BATCH'  where rti.interface_transaction_id = 3671265
    enq: TX - row lock contention
    RCV_TRANSACTIONS_INTERFACE
    +00 00:01:01.102000
    my problem is in the above  output among 4 which i have to delete so sove my issue.
    its very urgent for me.
    plz plz suggest me and how can i kill the session.
    thanks & regards
    pritesh ranjan

    priteshranjan wrote:
    hi expert,
    when i m going to run the below query
    Update rcv_transactions_interface rti set rti.processing_mode_code ='BATCH'  where rti.interface_transaction_id = 3671265
    it gives the error:
    ORA-00054 resource busy and acquire with NOWAIT specified.
    i find out the blocking session by using the blow query;
    SELECT  a.SESSION_ID, a.SESSION_SERIAL#, min(A.SAMPLE_TIME) start_time,max(A.SAMPLE_TIME) end_time,a.inst_id, a.blocking_session,a.user_id,s.sql_text,A.EVENT,O.OBJECT_NAME,max(A.SAMPLE_TIME) - min(A.SAMPLE_TIME)
    FROM GV$ACTIVE_SESSION_HISTORY a  ,gv$sql s, dba_objects o
    where a.sql_id=s.sql_id
    and A.CURRENT_OBJ# = O.OBJECT_ID
    and blocking_session is not null
    and a.user_id  != 0 -- exclude SYS user
    and a.sample_time > sysdate - 7
    and a.event = 'enq: TX - row lock contention'
    group by a.SESSION_ID, a.SESSION_SERIAL#, a.inst_id,a.blocking_session,a.user_id,s.sql_text,A.EVENT,O.OBJECT_NAME
    it gives the output
    SESSION_ID
    SESSION_SERIAL#
    START_TIME
    END_TIME
    INST_ID
    BLOCKING_SESSION
    USER_ID
    SQL_TEXT
    EVENT
    OBJECT_NAME
    MAX(A.SAMPLE_TIME)-MIN(A.SAMPLE_TIME)
    369
    45,849
    9/4/2013 8:29:33.119 AM
    9/4/2013 11:40:27.508 AM
    1
    554
    173
    SELECT POL.UNIT_PRICE   FROM PO_LINES POL  WHERE POL.PO_LINE_ID = :b1
    enq: TX - row lock contention
    PO_LINES_ALL
    +00 03:10:54.389000
    554
    18,872
    9/4/2013 8:29:33.119 AM
    9/4/2013 11:40:27.508 AM
    1
    365
    173
    SELECT POL.UNIT_PRICE,POL.QUANTITY,POL.UNIT_MEAS_LOOKUP_CODE,POL.AMOUNT   FROM PO_LINES POL  WHERE POL.PO_LINE_ID = :b1
    enq: TX - row lock contention
    JA_IN_PO_LINE_LOCATION_TAXES
    +00 03:10:54.389000
    572
    168
    9/4/2013 8:29:33.119 AM
    9/4/2013 11:40:27.508 AM
    1
    554
    173
    select line_location_id into :b0 from po_line_locations_all where line_location_id=:b1 for update of line_location_id
    enq: TX - row lock contention
    PO_LINE_LOCATIONS_ALL
    +00 03:10:54.389000
    581
    4,973
    9/4/2013 10:49:38.157 AM
    9/4/2013 10:50:39.259 AM
    1
    572
    173
    Update rcv_transactions_interface rti set rti.processing_mode_code ='BATCH'  where rti.interface_transaction_id = 3671265
    enq: TX - row lock contention
    RCV_TRANSACTIONS_INTERFACE
    +00 00:01:01.102000
    my problem is in the above  output among 4 which i have to delete so sove my issue.
    its very urgent for me.
    plz plz suggest me and how can i kill the session.
    thanks & regards
    pritesh ranjan
    According to the above, your session_id is 581 which is blocked by session_id 572 so you need to kill the 3rd session in the list.
    Thanks,
    Hussein

Maybe you are looking for