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.

Similar Messages

  • 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

  • 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 Session option is not rac aware?

    Connected to a RAC db, tried to kill session but SD kept complaining that session doesn't exist. It seems it shows sessions from gv$session but while issuing kill, it assumes session on local node.
    Would it not be possible to enhance the kill to use 'rac-aware' command ? alter system kill session 'sid,serial#@inst_id' ?

    Connected to a RAC db, tried to kill session but SD kept complaining that session doesn't exist. It seems it shows sessions from gv$session but while issuing kill, it assumes session on local node.
    Would it not be possible to enhance the kill to use 'rac-aware' command ? alter system kill session 'sid,serial#@inst_id' ?
    I can't address the Sql Dev specifics but the 'kill' statement itself is NOT rac-aware in versions prior to 11.1 (you did NOT provide your DB  version.
    And for 11.1 and later you have to provide the instance id for the third parameter.
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_2013.htm
      For the optional integer3, specify the ID of the instance where the target session to be killed exists. You can find the instance ID by querying the GV$ tables.
    I suggest you edit your post and provide more info so someone from the sql dev team can respond to how sql dev issues that particular statement. Depending on your sql dev version the actual sql issued would be shown in the log window if you have it open.
    1. full DB version - that 3rd parameter is NOT supported for versions prior to 11.1
    2. full Sql version

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

  • Immediate kill session in alert log file

    hi..
    i'm using db10.2.0 ,windows 2003 server
    we're having alot of "immediate kill session " in the alert log file ,what could be causing it?
    the log file looks lsomething ike that
    Sat Oct 11 10:55:33 2008
    Thread 1 advanced to log sequence 2390
    Current log# 1 seq# 2390 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\ABS\REDO01.LOG
    Current log# 1 seq# 2390 mem# 1: E:\DATABASE\ABS\REDO_LOGS\REDO01B.LOG
    Sat Oct 11 11:08:23 2008
    Immediate Kill Session#: 196, Serial#: 96
    Immediate Kill Session: sess: B7A4F764 OS pid: 2744
    Sat Oct 11 11:08:27 2008
    Immediate Kill Session#: 183, Serial#: 62
    Immediate Kill Session: sess: B823F4D0 OS pid: 2348
    Sat Oct 11 11:08:33 2008
    Immediate Kill Session#: 198, Serial#: 68
    Immediate Kill Session: sess: B7A50A2C OS pid: 2856
    Sat Oct 11 11:08:33 2008
    Immediate Kill Session#: 77, Serial#: 349
    Immediate Kill Session: sess: B8201168 OS pid: 5704
    Sat Oct 11 11:08:34 2008
    Immediate Kill Session#: 156, Serial#: 257
    Immediate Kill Session: sess: B7A37FC4 OS pid: 3428
    Sat Oct 11 11:08:41 2008
    Immediate Kill Session#: 92, Serial#: 104
    Immediate Kill Session: sess: B7A126C4 OS pid: 3500
    Sat Oct 11 11:08:45 2008
    Immediate Kill Session#: 178, Serial#: 17
    Immediate Kill Session: sess: B7A44E5C OS pid: 3408
    Sat Oct 11 11:08:51 2008
    Immediate Kill Session#: 180, Serial#: 43
    Immediate Kill Session: sess: B7A46124 OS pid: 1592
    Sat Oct 11 11:08:56 2008
    Immediate Kill Session#: 81, Serial#: 310
    Immediate Kill Session: sess: B82036F8 OS pid: 5088
    Sat Oct 11 11:08:57 2008
    Immediate Kill Session#: 114, Serial#: 290
    Immediate Kill Session: sess: B7A1F55C OS pid: 952
    Sat Oct 11 11:09:02 2008
    Immediate Kill Session#: 104, Serial#: 117
    Immediate Kill Session: sess: B7A19774 OS pid: 4068
    Sat Oct 11 11:09:11 2008
    Immediate Kill Session#: 177, Serial#: 20
    Immediate Kill Session: sess: B823BC78 OS pid: 2024
    Sat Oct 11 11:09:16 2008
    Immediate Kill Session#: 145, Serial#: 34
    Immediate Kill Session: sess: B8228FF8 OS pid: 4012
    Sat Oct 11 11:09:18 2008
    Immediate Kill Session#: 72, Serial#: 265
    Immediate Kill Session: sess: B7A06AF4 OS pid: 5592
    Sat Oct 11 11:09:28 2008
    Immediate Kill Session#: 176, Serial#: 9
    Immediate Kill Session: sess: B7A43B94 OS pid: 1988
    Sat Oct 11 11:09:37 2008
    Immediate Kill Session#: 148, Serial#: 118
    Immediate Kill Session: sess: B7A334A4 OS pid: 1216
    Sat Oct 11 11:09:41 2008
    Immediate Kill Session#: 110, Serial#: 1190
    Immediate Kill Session: sess: B7A1CFCC OS pid: 2152
    Sat Oct 11 11:09:46 2008
    Immediate Kill Session#: 141, Serial#: 488
    Immediate Kill Session: sess: B8226A68 OS pid: 5460
    Sat Oct 11 11:09:51 2008
    Immediate Kill Session#: 130, Serial#: 96
    Immediate Kill Session: sess: B7A28B9C OS pid: 1312
    Sat Oct 11 11:10:48 2008
    Immediate Kill Session#: 101, Serial#: 1592
    Immediate Kill Session: sess: B820F2C8 OS pid: 5936
    Sat Oct 11 11:10:57 2008
    Immediate Kill Session#: 170, Serial#: 5
    Immediate Kill Session: sess: B7A4033C OS pid: 3356
    Sat Oct 11 11:11:05 2008
    Immediate Kill Session#: 138, Serial#: 46
    Immediate Kill Session: sess: B7A2D6BC OS pid: 3156
    Sat Oct 11 11:11:06 2008
    Immediate Kill Session#: 111, Serial#: 1143
    Immediate Kill Session: sess: B82150B0 OS pid: 5056
    Sat Oct 11 11:11:09 2008
    Immediate Kill Session#: 132, Serial#: 228
    Immediate Kill Session: sess: B7A29E64 OS pid: 1628
    Sat Oct 11 11:11:10 2008
    Immediate Kill Session#: 150, Serial#: 560
    Immediate Kill Session: sess: B7A3476C OS pid: 2568
    Sat Oct 11 11:11:12 2008
    Immediate Kill Session#: 155, Serial#: 165
    Immediate Kill Session: sess: B822EDE0 OS pid: 3484
    Sat Oct 11 11:11:18 2008
    Immediate Kill Session#: 165, Serial#: 90
    Immediate Kill Session: sess: B8234BC8 OS pid: 1968
    Sat Oct 11 11:11:36 2008
    Immediate Kill Session#: 116, Serial#: 221
    Immediate Kill Session: sess: B7A20824 OS pid: 4848
    Sat Oct 11 11:11:37 2008
    Immediate Kill Session#: 192, Serial#: 54
    Immediate Kill Session: sess: B7A4D1D4 OS pid: 3972
    Sat Oct 11 11:11:45 2008
    Immediate Kill Session#: 164, Serial#: 98
    Immediate Kill Session: sess: B7A3CAE4 OS pid: 3888
    Sat Oct 11 11:11:45 2008
    Immediate Kill Session#: 121, Serial#: 17
    Immediate Kill Session: sess: B821AE98 OS pid: 1200
    Sat Oct 11 11:11:50 2008
    Immediate Kill Session#: 109, Serial#: 330
    Immediate Kill Session: sess: B8213DE8 OS pid: 3456
    Sat Oct 11 11:11:56 2008
    Immediate Kill Session#: 181, Serial#: 68
    Immediate Kill Session: sess: B823E208 OS pid: 3324
    Sat Oct 11 11:12:17 2008
    Immediate Kill Session#: 214, Serial#: 85
    Immediate Kill Session: sess: B7A5A06C OS pid: 2752
    Sat Oct 11 11:12:20 2008
    Immediate Kill Session#: 209, Serial#: 346
    Immediate Kill Session: sess: B824E8F8 OS pid: 3844
    Sat Oct 11 11:12:23 2008
    Immediate Kill Session#: 154, Serial#: 152
    Immediate Kill Session: sess: B7A36CFC OS pid: 3400
    Sat Oct 11 11:12:26 2008
    Immediate Kill Session#: 147, Serial#: 86
    Immediate Kill Session: sess: B822A2C0 OS pid: 2536
    Sat Oct 11 11:12:34 2008
    Immediate Kill Session#: 79, Serial#: 1504
    Immediate Kill Session: sess: B8202430 OS pid: 4052
    Sat Oct 11 11:12:47 2008
    Immediate Kill Session#: 189, Serial#: 234
    Immediate Kill Session: sess: B8242D28 OS pid: 2128
    Sat Oct 11 11:13:10 2008
    Immediate Kill Session#: 118, Serial#: 95
    Immediate Kill Session: sess: B7A21AEC OS pid: 3480
    Sat Oct 11 11:13:13 2008
    Immediate Kill Session#: 94, Serial#: 16
    Immediate Kill Session: sess: B7A1398C OS pid: 2140
    Sat Oct 11 11:14:24 2008
    ALTER SYSTEM SET service_names='aba10g' SCOPE=MEMORY SID='abs';
    Sat Oct 11 11:14:59 2008
    Immediate Kill Session#: 97, Serial#: 1197
    Immediate Kill Session: sess: B820CD38 OS pid: 4164
    Sat Oct 11 11:15:07 2008
    Immediate Kill Session#: 163, Serial#: 237
    Immediate Kill Session: sess: B8233900 OS pid: 3224
    Sat Oct 11 11:15:19 2008
    Immediate Kill Session#: 140, Serial#: 230
    Immediate Kill Session: sess: B7A2E984 OS pid: 1584
    Sat Oct 11 11:15:41 2008
    Thread 1 advanced to log sequence 2391
    Current log# 4 seq# 2391 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\ABS\REDO4.LOG
    Current log# 4 seq# 2391 mem# 1: E:\DATABASE\ABS\REDO_LOGS\REDO04B.LOG
    Sat Oct 11 11:15:51 2008
    Immediate Kill Session#: 88, Serial#: 541
    Immediate Kill Session: sess: B7A10134 OS pid: 4676
    Sat Oct 11 11:16:09 2008
    Immediate Kill Session#: 78, Serial#: 358
    Immediate Kill Session: sess: B7A0A34C OS pid: 6056

    2011-06-27 02:27:12.215: [    RACG][261091968] [24623][261091968][ora.rac.rac1.inst]: clsrcqryapi: crs_qstat error
    2011-06-27 02:27:12.215: [    RACG][261091968] [24623][261091968][ora.rac.rac1.inst]: clsrcpullupvip: Failed to get status of ora.srv01-025.vip
    2011-06-27 02:27:12.810: [    RACG][282473088] [24623][282473088][ora.rac.rac1.inst]: clscconnect failed with clsc ret 9
    2011-06-27 02:27:12.811: [    RACG][282473088] [24623][282473088][ora.rac.rac1.inst]: error connecting to CRSD at [(ADDRESS=(PROTOCOL=IPC)(KEY=CRSD_UI_SOCKET))] clsccon 184
    2011-06-27 02:27:12.811: [    RACG][261091968] [24623][261091968][ora.rac.rac1.inst]: clsrcqryapi: crs_qstat error
    2011-06-27 02:27:13.237: [    RACG][261091968] [24623][261091968][ora.rac.rac_srv.cs]: clsrcqryapi: crs_qstat error
    2011-06-27 02:27:13.625: [    RACG][261091968] [24623][261091968][ora.rac.rac_srv.rac1.srv]: clsrcqryapi: crs_qstat error
    2011-06-27 02:27:13.625: [    RACG][261091968] [24623][261091968][ora.rac.rac_srv.rac1.srv]: clsrcsmfread: cannot get status of resource 'ora.rac.rac_srv.rac1.srv'
    2011-06-27 02:27:15.829: [  OCRMSG][261091968]prom_rpc: CLSC send failure..ret code 11
    2011-06-27 02:27:15.829: [  OCRMSG][261091968]prom_rpc: possible OCR retry scenario
    2011-06-27 02:27:15.881: [  OCRAPI][261091968]procr_open: Node Failure. Attempting retry #0
    2011-06-27 02:27:16.096: [    RACG][261091968] [24623][261091968][ora.rac.rac_srv.rac1.srv]: clsrcqryapi: crs_qstat error
    Edited by: user13481820 on Jun 26, 2011 10:53 PM

  • How to kill session in forms

    In my application I want to kill session if any user
    is idle for 2 minutes.
    I am using oracle forms 6i and database oracle 9i

    You have to use D2KWutil.pll
    In when new form instance write the following code
    declare
    hWind PLS_INTEGER;
    CheckTimer TIMER;
    begin
    hWind := get_window_property(FORMS_MDI_WINDOW,WINDOW_HANDLE);
    Win_API_Session.Timeout_Start_Timer(hWind);
    CheckTimer := Create_Timer('CheckTimeout',1000,repeat);
    end;
    and in when timer expired trigger write the following code
    begin
    if upper(get_application_property(TIMER_NAME)) = 'CHECKTIMEOUT' then
                   :timer.t1 := Win_api_session.Timeout_Get_Inactive_Time;     
    if :timer.t1 > 120 then -- timer is a block and t1 is text item (don't assign a canvas to it, make it invisible)
    Win_API_Session.timeout_delete_timer;
    exit_form (NO_VALIDATE);
    end if;
    end if;
    end;
    hope this helps !!

  • Urgent-how to run 'alter system kill session 'sid, serial#' in form 6i ?

    I want to write a procedure in Form 6i so that user can kill the session by herself.
    I know kill session sql is 'alter system kill session 'sid, serial#'', however, I fould that I can only run it it sql plus screen, how can I run it in Form or in Stored procedure?
    Urgent....Please!

    try using Forms_ddl('alter system......'); in the forms. it will execute the dml statements in the form.
    zaibi.

  • Killed sessions

    Hi,
    I kill a session with the commands:
    select username, sid, serial#, status from v$session where username like 'RION%'
    alter system kill session 'sid, serial#'
    and if I give again the first select command at the status column appears KILLED. I want not to have KILLED in the status column.
    Thank you,
    Mihaela

    hi all,
    As u know you are seeing the status of at v$session view as killed, I wanna confirm that this will exists in two senario.
    When a Session is in inactive state and a kill command on that session is issued then the "status" column of v$session will be updated as killed as to indicate/mark as it is killed, and the "server " column will be updated as psuedo. when the user again try to connect to the session user will receive 0ra-00028 error and the entry will be removed from v$session.
    Another senario is that the transaction is at its half way, either in commiting or at the roleback stage for that partucular session then also you can find that the v$table is updated as above.
    more information, go through the documentation, at the Server Process handling section.
    i hope it cleared your confussion,

  • Kill Session in Oracle 10g

    Oracle 10g r2
    I killed a session after fetching the sid and serial from the v$session as under
    select * from v$session where username='SAM';
    alter system kill session '530,7420'
    Now the status showed killed.
    But again after some time one i query the v$session the status turn to inactive.
    Why so?

    Yeah Madrid....
    Thanks for that.. at the developer side.. they did get session killed.
    But actually my doubt here was. that once i killed the session then i go the status as "killed" in the v$session
    but less then a minute when i again query the v$session then i see the status aa inactive. This is what is not clear to me.

  • RAR 5.3 - kill session of another user

    how can RAR admin kill session of another user?

    Hi Partha,
    There is no way out to kill a user's session in RAR, nor in UME. The only place you can kill a user's session is in backend (R/3 side of a particular system) in T-code: SM04->select a particular session of any user-> end session.
    Regards,
    Gurugobinda

  • ALTER SYSTEM KILL SESSION privilege

    Hi All,
    Is there any possibility to use this command from a without having DBA priviileges, what is the privilege to be grantd to the ordinary users to execute ALTER SYSTEM KILL SESSION... statement..
    Thanks in advance

    The procedure proposed by Rusell would be more or less so:
    SQL> create or replace procedure kill_session
      2  ( v_sid number, v_serial number )
      3  as
      4  v_varchar2 varchar2(100);
      5  begin
      6  execute immediate 'ALTER SYSTEM KILL SESSION '''
      7  || v_sid || ',' || v_serial || '''';
      8  end;
      9  /
    Procedure created.
    SQL> select username, sid, serial# from v$session;
    USERNAME                              SID    SERIAL#
                                          147       5078
    SYS                                   148       6161
                                          151       6769
                                          156          1
                                          158          1
                                          159          1
    REPOS_OWNER                           161      14502
                                          163          1
                                          164          1
                                          165          1
                                          166          1
    USERNAME                              SID    SERIAL#
                                          167          1
                                          168          1
                                          169          1
                                          170          1
    15 rows selected.
    SQL>
    SQL> exec kill_session(161,14502);
    PL/SQL procedure successfully completed.
    SQL>Joel Pérez
    http://otn.oracle.com/experts

  • Kill session permission without alter system permission?

    Syntax to kill session is
    ALTER SYSTEM KILL SESSION 'session info';
    Is there a way to allow a user to kill his/her own session without granting rights to SYSTEM? I don't want anyone to be able to drop the database, but they need to be able to kill their own session. I've looked everywhere...
    Thanks in advance!

    Yes, assuming you are using standard definer's rights stored procedures. Only if you specify AUTHID CURRENT_USER when creating the stored procedure will you get an invoker's rights stored procedure, which would run with the privileges of the caller, not of the definer.
    Justin

  • To kill session in one schema from another schema

    Hi Team,
    I got a problem like a table from one of my schema has been locked. I am getting 'ORA-00054: resource busy and acquire with NOWAIT specified' error when trying to delete rows from that table or even when trying to truncate that table.
    Let the table be 'T1' present in schema 'VIEW'
    I tried to kill the session which is active for that schema by below query
    select sid,serial#,status from v$session where username='VIEW' and STATUS = 'ACTIVE';
    alter system kill session '681,2586';
    But i couldn't do the above as i don't have DBA privilege for that. But i have DBA privilege for another schema let it be 'ADMIN'
    Now how can i kill the session in schema 'VIEW' from schema 'ADMIN'
    can any one get me solution.
    Thanks in Advance
    11081985

    I got a problem like a table from one of my schema has been locked. I am getting 'ORA-00054: resource busy and acquire with NOWAIT specified' error when trying to delete rows from that table or even when trying to truncate that table.
    Before you do anything why don't you actually find out WHY that table has been locked.
    You generally should NOT be killing sessions without knowing what is causing the problem to begin with.
    Then you also need to determine if you should use KILL SESSION or instead use DISCONNECT SESSION and well as whether the use of IMMEDIATE is appropriate.
    Each of those choices acts differently. Many people use KILL when they should really use DISCONNECT.
    See DISCONNECT SESSION Clause and KILL SESSION Clause in the ALTER SESSION chapter of the SQL Language doc
    http://docs.oracle.com/cd/E11882_01/server.112/e17118/statements_2014.htm#i2282145

  • Abend while executing alter system kill session command

    I have a ML350 G3 Hp server(Xeon 2.4 Ghz) running oracle 8.1.5 on Novell 5.1. Frequently i have locking problems in my software. So when i tried to kill the active session using alter system kill session 'sid, serial#' my server produce following error:
    Fatal Exception (Number 14, cause abend: Page fault running process: orcl_000000fe code executing in module core81.nlm v8.1d at offset +6c490h). Any suggestions.

    This forum is for posting feedback about the OTN site.
    The best place for your question is probably a Database forum.
    There is a list of Database forums here:
    http://forums.oracle.com/forums/index.jsp?cat=18

Maybe you are looking for