Killing oracle session in RAC

Hi
Some of the tables ot locked in my database(it is 4 node RAC) so i first identified the session id and serial has to kill the session using belo query
col oracle_username for a10
col os_user_name for a10
set linesize 150
select s.sid,s.serial#,s.inst_id,l.inst_id,l.session_id,l.oracle_username,l.XIDUSN,l.XIDSLOT,l.XIDSQN,l.OBJECT_ID,
l.OS_USER_NAME,l.PROCESS,l.LOCKED_MODE
from gv$session s,gv$locked_object l
where s.sid=l.session_id
and ORACLE_USERNAME='&USERNSME';
it gaves me below result
       168        202          1          1        168 TEST123           72          0      34994      35239 test123   6652            3
so i tried to kill it using below command
alter system kill session '168,202,@1' immediate;
but i m getting below error
SQL> ALTER SYSTEM KILL SESSION '168,202,@1' IMMEDIATE;
ALTER SYSTEM KILL SESSION '168,202,@1' IMMEDIATE
ERROR at line 1:
ORA-00030: User session ID does not exist.plz suggest how do i kill session in oracle rac

yes it is there
SQL> select sid,serial# from v$session where sid=168 and serial#=202;
       SID    SERIAL#
       168        202
SQL>  select sid,serial#,inst_id from gv$session  where sid=168 and serial#=202;
       SID    SERIAL#    INST_ID
       168        202          1
SQL> alter system kill session '168,202' immediate;
alter system kill session '168,202' immediate
ERROR at line 1:
ORA-00030: User session ID does not exist.
SQL> alter system kill session '168,202,@1' immediate;
alter system kill session '168,202,@1' immediate
ERROR at line 1:
ORA-00030: User session ID does not exist.

Similar Messages

  • How to kill oracle session?

    hi there,
    Aside from using tool like TOAD is there a syntax on how to kill oracle session?
    pls help.
    tnx...

    First findout the SID, Serial No for the Particular Session ( syntax is as follows )
    SELECT sid, serial#,osuser, program FROM v$session;
    (Killing the session on SQL Prompt)
    ALTER SYSTEM KILL SESSION 'sid,serial#';
    force to kill the session by adding IMMEDIATE
    ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
    OS Oracle Kill Session
    First findout the SID, SPID for the Particular Session ( SQL syntax is as follows )
    SELECT s.sid,p.spid, s.osuser ,s.program
    FROM v$process p, v$session s
    WHERE p.addr = s.paddr;
    Windows OS Command for kill Session
    orakill SID SPID
    Regs,
    Naresh

  • Killing Oracle Sessions

    Please ignore it. By mistakely i posted this thread here.
    Hi All,
    I want to drop one user. If i made a attempt to drop that user, I rec'd "ORA-01940: cannot drop a user that is currently connected." error. So I checked with sessions with the username. No one is using this user. But it resists some inactive sessions.
    SQL> DROP USER test cascade;
    DROP USER test cascade
    ERROR at line 1:
    ORA-01940: cannot drop a user that is currently connected
    SQL>select sid,serial#,username,status from v$session where schemaname='TEST';
    SID SERIAL# USERNAME STATUS
    131 4026 TEST INACTIVE
    143 29325 TEST INACTIVE
    SQL> alter system kill session '131,4026' immediate;
    system altered.
    SQL>alter system kill session '143,29325' immediate;
    system altered.
    SQL> alter system kill session '131,4026' immediate;
    system altered.
    SQL>alter system kill session '143,29325' immediate;
    system altered.
    SQL> alter system kill session '131,4026' immediate;
    system altered.
    SQL>alter system kill session '143,29325' immediate;
    system altered.
    SQL> alter system kill session '131,4026' immediate;
    system altered.
    SQL>alter system kill session '143,29325' immediate;
    system altered.
    Now. I checked in v$sessions,
    SQL>select sid,serial#,username,status from v$session where schemaname='TEST';
    SID SERIAL# USERNAME STATUS
    139 12982 AGILITY_QA INACTIVE
    141 54482 AGILITY_QA INACTIVE
    It shows some other inactive sessions. so i am trying to kill these 2 sessions again some inactive sessions will show.
    Please assist me to fix that problem.
    Message was edited by:
    Moorthy GS

    Try the output of the query to kill all sessions:
    select 'alter system kill session '''||sid||','||'4026''' immediate;' scr
    from v$session
    where schemaname='TEST' and status <> 'KILLED'
    Regards
    RK

  • 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

  • Alter system kill session in RAC

    Hi,
    After identifying all inactive jdbc sessions or blocking sessions from gv$session or gv$lock respectively, should alter system kill session executed in both instances of RAC?, Can't we execute like alter system kill session ' inst_id,sid,serial#' from a single instance to kill all the session of RAC instances?
    So, above problem answered in 11g as:
    Alter system kill session ‘SID, serial#, @instance_id’;
    Eg: ALTER SYSTEM KILL SESSION ‘115,9779,@1';
    So, In our environment, most of the databases are in 10gR1 or 10g R2. Is there any patch for 10g Where instance_id can be recognized by alter system kill session?
    Thanks,
    Sunil.

    Hi Dan,
    Not sure what you mean by "instance specific kill session capability".
    To be clear, I'm speaking of a new feature, introduced in 11gR1, that provides for an optional third parameter to 'alter system kill session', which allows you to kill a session on a remote instance, in a RAC environment.
    Documentation is here:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_2013.htm#i2065117
    -Mark

  • How to kill concurrent request oracle session which is terminated

    Dear,
    In our production environment Concurrent request "Gather Schema Stats" was running 2 days. Hence we cancelled the request.
    Request completed as terminated status. Unfortunately the oracle session of that concurrent request went to "Killed" status. Still utilizing CPU resource.
    If we try, "alter system kill session 'SID,serial#';"
    it gives below message,
    ERROR at line 1:
    ORA-00031: session marked for kill
    Could you please provide steps to kill this oracle session.
    Instance detail:
    Oracle Applications R12.1
    Oracle database 11.1.0.7
    Thanks,
    ...basha
    Edited by: 913932 on Jun 25, 2012 2:32 AM

    In our production environment Concurrent request "Gather Schema Stats" was running 2 days. Hence we cancelled the request.
    Request completed as terminated status. Unfortunately the oracle session of that concurrent request went to "Killed" status. Still utilizing CPU resource.
    If we try, "alter system kill session 'SID,serial#';"
    it gives below message,
    ERROR at line 1:
    ORA-00031: session marked for killTry "alter system kill session 'SID,serial#' immediate".
    Could you please provide steps to kill this oracle session.Concurrent Processing - How to Find Database Session & Process Associated with a Concurrent Program Which is Currently Running. [ID 735119.1]
    Thanks,
    Hussein

  • Kill session in RAC

    Hello, I have a RAC environment, and I need to kill a session, I user "alter kill session <SID> , <SERIAL>", but the session still appear in the database, so I tried to kill througn the OS (Unix), but the spid don´t match with the PID of SO.
    Any suggestion?
    clarification: I am connected in the same node, at database (11g R1) and the server.
    Thanks.

    I have been checked all nodes, and the spid of the session don´t appear in none.

  • Killing a oracle session

    Hi,
    I run a oracle query which has gone to deadlock.now i want to kill that session because it's happening frequently.How can i kill my own oracle process without needed DBA privs.
    Regards
    Anand

    Do not confuse between deadlock and hang.
    See the difference.
    Here a deadlock :
    Session 1:
    SCOTT@demo102> select empno, ename from emp25;
         EMPNO ENAME
          7369 SMITH
          7499 ALLEN
          7521 WARD
          7566 JONES
          7654 MARTIN
          7698 BLAKE
          7782 CLARK
          7788 SCOTT
          7839 KING
          7844 TURNER
          7876 ADAMS
         EMPNO ENAME
          7900 JAMES
          7902 FORD
          7934 MILLER
    14 rows selected.
    SCOTT@demo102> begin
      2                update emp25 set ename = 'TEST' where empno=7369;
      3                dbms_lock.sleep(10);
      4                update emp25 set ename = '2' where empno=7499;
      5            end;
      6  /
    PL/SQL procedure successfully completed.
    SCOTT@demo102> Session 2:
    SCOTT@demo102> l
      1  begin
      2      update emp25 set ename = 'TEST' where empno=7499;
      3      dbms_lock.sleep(10);
      4      update emp25 set ename = '2' where empno=7369;
      5* end;
    SCOTT@demo102> /
    begin
    ERROR at line 1:
    ORA-00060: deadlock detected while waiting for resource
    ORA-06512: at line 4
    SCOTT@demo102> As you can see above, there is no wait, neither of both session hang, so you don't need to kill one of them.
    Here a hang session :
    Session 1:
    SCOTT@demo102> update emp25 set ename = 'TEST' where empno=7369;
    1 row updated.
    SCOTT@demo102> Session 2:
    SCOTT@demo102> update emp25 set ename = 'TEST' where empno=7369;=> Wait event (commit/rollback) from session 1.
    If user which is owner of session1 go at home, session 2 will wait all the week-end.
    You need a third session to unblock situation :
    SYS@DEMO102> DECLARE  
      2     CURSOR lcobj_cur IS
      3        select session_id
      4        ,      oracle_username
      5        ,      os_user_name
      6        ,      object_id obj_id
      7        ,      locked_mode
      8        from   V$LOCKED_OBJECT;
      9       
    10     CURSOR obj_cur(p_obj_id IN NUMBER) IS
    11        select owner||'.'||object_name object_name
    12        ,      object_type
    13        from dba_objects
    14        where object_id = p_obj_id;
    15     l_sid    number;
    16     l_serial number;
    17  BEGIN
    18     DBMS_OUTPUT.PUT_LINE(RPAD('Sid',5)||
    19                          RPAD('Serial',8)||
    20                          RPAD('O-User',10)||
    21                          RPAD('OS-User',10)||
    22                          RPAD('Owner.Object Name',45)||
    23                          RPAD('Object Type',35));
    24 
    25     DBMS_OUTPUT.PUT_LINE(RPAD('-',1,'-')||
    26                          RPAD('-',1,'-')||
    27                          RPAD('-',6,'-')||
    28                          RPAD('-',6,'-')||
    29                          RPAD('-',41,'-')||
    30                          RPAD('-',31,'-'));
    31 
    32     FOR lcobj IN lcobj_cur
    33     LOOP
    34        FOR obj IN obj_cur(lcobj.obj_id)
    35        LOOP
    36           select distinct sid, serial# into l_sid, l_serial from v$session where sid= lcobj.session_id;
    37           DBMS_OUTPUT.PUT_LINE(RPAD(lcobj.session_id,5)||
    38                                RPAD(l_serial,8)||
    39                                RPAD(lcobj.oracle_username,10)||
    40                                RPAD(lcobj.os_user_name,10)||
    41                                RPAD(obj.object_name,45)||
    42                                RPAD(obj.object_type,35));
    43        END LOOP;
    44     END LOOP;
    45  END;
    46  /
    Sid  Serial  O-User    OS-User   Owner.Object Name                            Object Type
    147  121     SCOTT     INKASHI\AdSCOTT.EMP25                                  TABLE
    152  18      SCOTT     INKASHI\AdSCOTT.EMP25                                  TABLE
    PL/SQL procedure successfully completed.
    SYS@DEMO102>
    SYS@DEMO102> select /*+ ORDERED */
      2     blocker.sid blocker_sid
      3  ,  blocked.sid blocked_sid
      4  ,  TRUNC(blocked.ctime/60) min_blocked
      5  ,  blocked.request
      6  from (select *
      7        from v$lock
      8        where block != 0
      9        and type = 'TX') blocker
    10  ,    v$lock            blocked
    11  where blocked.type='TX'
    12  and blocked.block = 0
    13  and blocked.id1 = blocker.id1
    14  /
    BLOCKER_SID BLOCKED_SID MIN_BLOCKED    REQUEST
            152         147           4          6
    SYS@DEMO102>
    SYS@DEMO102> alter system kill session '152,18';
    System altered.
    SYS@DEMO102> Then session1 will be disconnected :
    SCOTT@demo102> select * from emp25;
    select * from emp25
    ERROR at line 1:
    ORA-00028: your session has been killed
    SCOTT@demo102> And session2 can continue his work :
    1 row updated.
    SCOTT@demo102> select * from emp25;
         EMPNO ENAME      JOB              MGR HIREDATE        SAL       COMM
        DEPTNO
          7369 TEST       CLERK           7902 17/12/80       8000
            20
    ...Hope this help,
    Nicolas.

  • Kill session in rac on other node

    I need sql that kills all sessions at all nodes
    version ORACLE 10gR2
    what to do?

    You could use the same approach as for enabling restricted session.
    declare
    job binary_integer;
    inst_id number := '&inst_id';
    sid number := '&sid';
    serial number := '&serial';
    begin
    dbms_job.submit (
    job=>job,
    what=> 'begin execute immediate ''alter system kill session ''''' || sid || ',' || serial || '''''; end;',
    instance=>inst_id
    commit;
    end;
    or you can drive it from gv$session by some criteria, e.g.
    for s in (select inst_id, sid, serial# from gv$session whre username = '&bad_user')
    loop
    dbms_job.submit (
    job=>job,
    what=> 'begin execute immediate ''alter system kill session ''''' || i.sid || ',' || i.serial# || '''''; end;',
    instance=>i.inst_id
    end loop;
    ...

  • Kill all oracle session

    Situation:
    Oracle Forms 9i application, with multiple oracle forms (MDI). When I call a new forms I use OPEN_FORM(v_cm_module, ACTIVATE, session, pl_id) so I create a new oracle session.
    Problem:
    The user open a lot of windows (oracle forms .fmx with diferent sessions each one) in the oracle forms application, when they close the browser window (X botom of the browser, mozilla, internet explorer), the session are still alive (only kill one session....the first I think).
    I know that after 15 minutes oracle kill the rest of the sessions, but if the user was editing a block (locking a record), and close the browser, the table still lock 15 minutes!!!!.
    Any sugestions:???
    Thanks

    Is it necessary to create a session for each form?
    If so you could do the following:
    in the formsweb.cfg set the seperateframe property on true; and place some JavaScript code into the htmlafterform property:
    HTMLafterForm=<script type="text/javascript"> window.moveTo(-10000, -10000); </script>
    now you have a seperate frame, the browser window gets moved to a position where you can't see it ;-). when clicking the X button in the seperate frame the current form will be closed; your MDI application is still running...if you wan't you can write a JavaBean, and get the windowlisteners of the seperate frame and replace them with your own...of course you can close the Browser by right clicking and closing it in the taskbar; but that's a thing you must live with...
    besides that I have no clue how to get rid of those sessions, as I don't you have any event you can act with when closing the Browser. But if so you could save every sid in every when-new-form-instance trigger (you can get it from v$mystat), and when this event occurs you could kill all those sessions (alter system kill session ....) ;-). but as far as I know that's not possible...
    regards
    christian

  • 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'.

  • Old Oracle Session with Tomcat is not kiiling automatically

    Hi,
    I am facing a problem of increasing inactive oracle sessions with tomcat, Old Oracle sessions with tomcat are visible with new one.
    if somebaody did not restarted tomcat gracefully, then does Oracle keep the session connected or is there any way that whenever any one restarted tomcat abnormally, Oracle session can be killed.
    I had restart the database to kill session.

    Could you please tell me that where do i set this parameter in parameter file or sql net file and what is the recommended value, do you have any document on this.
    Another thing tomcat is in other server machine and my database is in different server machine, killing process in tomcat server machine manually may not kill linux process on oracle database machine and therefore oracle sessions are still there.
    Is it possible?
    Edited by: user605066 on 28-Aug-2008 04:59

  • Killing User sessions and user calcs

    Hi all,
    We have a situation where users run their business rules during evening and at times in night.
    We also have a maxl script which does aggregation and other calcs daily in night and it does not run as other calcs are launched by users.
    Is it possible to kill the user session and calcs launched by users before running maxl calculation for consolidations?
    I know I can do in in EAS, but want to try to do it in MAxL for automation.
    Thanks in advance

    You would be better off locking people out. After you kick off the automated calc, killing sessions doesn't stop them from initiating calcs while your automated calc is running. In answer to your question, yes, you can do that in maxl.
    alter system kill request all;
    You have other options if you want to be more selective on what you kill.
    kill request <session-id>
    kill request by user
    kill request on application
    kill request on database
    Check out the technical documentation for more info - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/launch.html.
    Kyle Goodfriend
    http://www.in2hyperion.com
    Please make sure to assign helpful/answered to responses if applicable - it rewards those who help and benefits the user community.

  • Java hibernate oracle sessions never get closed

    Hi all,
    I'm opening some Oracle sessions from a java-hibernate app. When a shutdown my java-hibernate the oracle sessions remain opened, even if the java process is not seen as running with "ps -fea | grep java".
    The problem is that this oracle sessions never die, they remain there and the only way to kill them is to either manually kill oracle process, or to restart the oracle instance or to restart the unix box where oracle resides.
    My java/hibernate app always close the session with a final statement in the source code, no matter what.
    Thanks in advanced.

    Hi all,
    I'm opening some Oracle sessions from a java-hibernate app. When a shutdown my java-hibernate the oracle sessions remain opened, even if the java process is not seen as running with "ps -fea | grep java".
    The problem is that this oracle sessions never die, they remain there and the only way to kill them is to either manually kill oracle process, or to restart the oracle instance or to restart the unix box where oracle resides.
    My java/hibernate app always close the session with a final statement in the source code, no matter what.
    Thanks in advanced.

  • 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

Maybe you are looking for