Regarding error in alert -- immediate kill session

Dear Gurus
os - linux4.5
oracle -10.2.0.4
i have an error in my alert log file for node 2 as below(i m posting here main text what i found)
Immediate Kill Session#: 73, Serial#: 39455
Immediate Kill Session: sess: 0x402337f0ca0 OS pid: 17058
Immediate Kill Session#: 74, Serial#: 38391
Immediate Kill Session: sess: 0x402337f2208 OS pid: 25083
Immediate Kill Session#: 76, Serial#: 6725
Immediate Kill Session: sess: 0x40233833af0 OS pid: 17018
Immediate Kill Session#: 128, Serial#: 54171
Immediate Kill Session: sess: 0x4023383a5f8 OS pid: 25861
Sun Aug 14 14:25:31 2011
Process OS id : 25861 alive after kill
Errors in file /u01/app/oracle/admin/prod/udump/prod_ora_8179.trc
Immediate Kill Session: sess: 0x40233a3c1f8 OS pid: 28900
Immediate Kill Session#: 534, Serial#: 12002
Immediate Kill Session: sess: 0x40233a598e8 OS pid: 16102
Sun Aug 14 14:35:30 2011
ALTER SYSTEM SET service_names='prod' SCOPE=MEMORY SID='prod2';
Sun Aug 14 21:00:50 2011
Thread 2 advanced to log sequence 3684 (LGWR switch)
Current log# 3 seq# 3684 mem# 0: +RLOG_GROUP/prod/redo03.log
Mon Aug 15 18:56:50 2011
Thread 2 advanced to log sequence 3685 (LGWR switch)
trace file text is as
post info) last post received: 109 0 4
last post received-location: kslpsr
last process to post me: 40233693738 1 6
last post sent: 0 0 24
last post sent-location: ksasnd
last process posted by me: 40233693738 1 6
(latch info) wait_event=0 bits=0
Process Group: DEFAULT, pseudo proc: 0x40233786f80
O/S info: user: oracle, term: UNKNOWN, ospid: 21196 (DEAD)
OSD pid info: Unix process pid: 21196, image: oracle@dbrac2
Short stack dump: unable to dump stack due to error 72
Dump of memory from 0x00000402336539E0 to 0x0000040233653BE8
402336539E0 00000010 00000000 1DC35CE0 00000402 [.........\......]
402336539F0 00000010 000313A7 1DC60660 00000402 [........`.......]
40233653A00 00000003 000313A7 312D7370 00000402 [........ps-1....]
40233653AE0 00000007 000313A7 00000000 00000000 [................]
40233653AF0 00000000 00000000 00000000 00000000 [................]
Repeat 14 times
40233653BE0 00000000 00000000
SO: 0x402336a9318, type: 2, owner: (nil), flag: INIT/-/-/0x00
(process) Oracle pid=55, calls cur/top: (nil)/0x401fe14f1c8, flag: (0) -
int error: 0, call error: 0, sess error: 0, txn error 0
(post info) last post received: 109 0 4
last post received-location: kslpsr
last process to post me: 40233693738 1 6
last post sent: 0 0 24
last post sent-location: ksasnd
last process posted by me: 40233693738 1 6
(latch info) wait_event=0 bits=0
Process Group: DEFAULT, pseudo proc: 0x40233786f80
O/S info: user: oracle, term: UNKNOWN, ospid: 21597 (DEAD)
OSD pid info: Unix process pid: 21597, image: oracle@dbrac2
Short stack dump: unable to dump stack due to error 72
Dump of memory from 0x0000040233655858 to 0x0000040233655A60
40233655850 0000000C 00000000 [........]
40233655860 1DD637A8 00000402 00000010 000313A7 [.7..............]
40233655870 FE14F1C8 00000401 00000003 000313A7 [................]
40233655880 312CC588 00000402 00000013 0003129B [..,1............]
40233655890 33D61950 00000402 0000000B 000313A7 [P..3............]
402336558A0 339F1338 00000402 00000004 0003129B [8..3............]
402336558B0 28A937E8 00000402 00000007 000313A7 [.7.(............]
402336558C0 6259D858 00000401 00000053 000313A7 [X.Yb....S.......]
402336558D0 28A938C8 00000402 00000007 000313A7 [.8.(............]
402336558E0 28A956B8 00000402 00000007 000313A7 [.V.(............]
402336558F0 28A95798 00000402 00000007 000313A7 [.W.(............]
40233655900 28A9F000 00000402 00000007 000313A7 [...(............]
40233655910 28A9E9E0 00000402 00000007 000313A7 [...(............]
40233655920 00000000 00000000 00000000 00000000 [................]
Repeat 19 times
(latch info) wait_event=0 bits=0
Process Group: DEFAULT, pseudo proc: 0x40233786f80
O/S info: user: oracle, term: UNKNOWN, ospid: 27060 (DEAD)
OSD pid info: Unix process pid: 27060, image: oracle@dbrac2
Short stack dump: unable to dump stack due to error 72
Dump of memory from 0x0000040233653FF8 to 0x0000040233654200
40233653FF0 0000000A 00000000 [........]
40233654000 1DC35E78 00000402 00000010 000313A7 [x^..............]
40233654010 1DCD4AF0 00000402 00000003 000313A7 [.J..............]
Repeat 16 times
please give some hint what actually is it and why
also at the end in my alert what does it means
ALTER SYSTEM SET service_names='prod' SCOPE=MEMORY SID='prod2'
regards

By any chance if you back in the alert log just a little more does an ORA-00600 error appear before the immediate kill session messages? I found a few problem reports on the Oracle support site that might be of interest if there is:
ORA-00600 [1301] - Instance Terminated by PMON After Killing Sessions
ORA-600 [4072] Is Possible After Killing A Session Or Cancelling a Operation [ID 1113829.1]
Database Crash ORA-00600: [ksqcmi:res3], [], [], [], [], [], [], [] and ORA-00600: [1100], [ID 1327043.1]
HTH -- Mark D Powell --

Similar Messages

  • 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

  • Trace File Created Upon Execution of "alter system kill session sid, serial# immediate;"

    A problem within a third-party application is causing it to create and abandon Oracle sessions. At times three hundred or more abandoned sessions accumulated in the instance. The software company is working on the problem. Oracle's background processes will get rid of those sessions after several hours, but at times there were so many they caused the server to start using paging space. We wrote a SQL*Plus script to identify the abandoned sessions and kill them with command "alter system kill session <sid, serial#> immediate;". We automated the execution of the script a week ago. Today I noticed that in my udump directory an Oracle trace file has been created each time our script kills a session. A single trace file is created regardless of how many sessions are killed. No errors appear in the trace file.
    Is the creation of these trace files an indication that problems have occurred or are they there for information only?
    Since I know how and why the sessions are being killed, is it safe to ignore the trace files?
    Thank you,
    Bill

    The OS is AIX 5.2. The database server is 10.2.0.2. We are in the processing of upgrading to AIX 7.1 and database server 11.2.0.3.6.
    The script does not enable tracing for the SQL*Plus session.
    Below is the alert log message from a session killed at 11:22, and the corresponding trace file created at that same time:
    From alert_<sid>.log: 
    Wed Jul 31 11:22:01 2013
    Immediate Kill Session#: 1119, Serial#: 59885
    Immediate Kill Session: sess: 70000014dc4a7e0 OS pid: 267254
    /u02/admin/EXPRESS/udump $ ls -l express_ora_113358.trc
    -rw-r----- 1 oracle dba 2276 Jul 31 11:22 express_ora_113358.trc
    /u02/admin/EXPRESS/udump $ pg express_ora_113358.trc
    Dump file /u02/admin/EXPRESS/udump/express_ora_113358.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    ORACLE_HOME = /u01/app/oracle/product/10.2.0
    System name: AIX
    Node name: navis
    Release: 2
    Version: 5
    Machine: 0005CD8C4C00
    Instance name: EXPRESS
    Redo thread mounted by this instance: 1
    Oracle process number: 225
    Unix process pid: 113358, image: oracleEXPRESS@navis
    *** ACTION NAME:() 2013-07-31 11:22:01.181
    *** MODULE NAME:(SQL*Plus) 2013-07-31 11:22:01.181
    *** SERVICE NAME:(EXPRESS.WORLD) 2013-07-31 11:22:01.181
    *** SESSION ID:(1723.61000) 2013-07-31 11:22:01.181
    SO: 70000014d44d278, type: 2, owner: 0, flag: INIT/-/-/0x00
    (process) Oracle pid=463, calls cur/top: 0/700000139166298, flag: (0) -
    int error: 0, call error: 0, sess error: 0, txn error 0
    (post info) last post received: 108 0 4
    last post received-location: kslpsr
    last process to post me: 70000014d36c398 1 6
    last post sent: 0 0 24
    last post sent-location: ksasnd
    last process posted by me: 70000014d36c398 1 6
    (latch info) wait_event=0 bits=0
    Process Group: DEFAULT, pseudo proc: 70000014d6aec00
    O/S info: user: oracle, term: UNKNOWN, ospid: 267254
    OSD pid info: Unix process pid: 267254, image: oracleEXPRESS@navis
    Short stack dump:
    ksdxfstk+002c<-ksdxcb+04e4<-sspuser+0074<-00004CB0<-nttrd+0120<-nsprecv+0750<-ns
    rdr+0114<-nsdo+1714<-nsbrecv+0040<-nioqrc+04a8<-opikndf2+0688<-opitsk+088c<-opii
    no+0990<-opiodr+0adc<-opidrv+0474<-sou2o+0090<-opimai_real+01bc<-main+0098<-__st
    art+0090
    Dump of memory from 0x070000014D2CC3B0 to 0x070000014D2CC5B8
    70000014D2CC3B0 00000004 00000000 07000001 39DA8D48 [............9..H]
    70000014D2CC3C0 00000010 0003139D 07000001 39166298 [............9.b.]
    70000014D2CC3D0 00000003 0003139D 07000001 4C73D508 [............Ls..]
    70000014D2CC3E0 0000000B 0003139D 07000001 4DC4A7E0 [............M...]
    70000014D2CC3F0 00000004 00031291 00000000 00000000 [................]
    70000014D2CC400 00000000 00000000 00000000 00000000 [................]
    Repeat 26 times
    70000014D2CC5B0 00000000 00000000 [........]
    Thanks,
    Bill

  • Procedure for Killing sessions

    Hi All,
    Almost everyday we have requirement to kill user sessions for dev user, I'm thinking to create a procedure for this and grant to the users so that they can kill it by themself.
    Below is the what I got from Ask Tom forum, however appreciate if someone can share few information if already imlemented in there environment
    <quote>
    create or replace procedure kill_session( p_sid in number,
    p_serial# in number)
    is
    ignore pls_integer;
    BEGIN
    select count(*) into ignore
    from V$session
    where username = USER
    and sid = p_sid
    and serial# = p_serial# ;
    if ( ignore = 1 )
    then
    execute immediate '
    alter system kill session ''' ||
    to_char(p_sid,'999999')||','||
    to_char(p_serial#,'999999')||'''';
    else
    raise_application_error( -20001,
    'You do not own session ''' ||
    p_sid || ',' || p_serial# ||
    end if;
    END;/
    grant execute on kill_session to <username>
    </quote>
    Regards,
    shaan

    rp0428 wrote:
    >
    Instead of killing session with alter systemn kill session, better you opt for below two methods (still perform the same)
    >
    Please clarify what you mean. KILL and DISCONNECT do NOT perform the same.
    From the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_2013.htm
    KILL is the nice one -
    >
    The KILL SESSION clause lets you mark a session as terminated, roll back ongoing transactions, release all session locks, and partially recover session resources
    >
    While DISCONNECT is the ogre
    >
    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 difference between the two is roughly analogous to the difference between SHUTDOWN IMMEDIATE and SHUTDOWN ABORT.
    I agree that, for OPs use case DISCONNECT (with IMMEDIATE or POST TRANSACTION) may be better since it gets rid of things immediately while KILL can leave things hanging around for a while.From the same link:
    DISCONNECT SESSION Clause:
    The POST_TRANSACTION setting allows ongoing transactions to complete before the session is disconnected. If the session has no ongoing transactions, then this clause has the same effect described for as KILL SESSION.
    The IMMEDIATE setting disconnects the session and recovers the entire session state immediately, without waiting for ongoing transactions to complete.
    If you also specify POST_TRANSACTION and the session has ongoing transactions, then the IMMEDIATE keyword is ignored.
    If you do not specify POST_TRANSACTION, or you specify POST_TRANSACTION but the session has no ongoing transactions, then this clause has the same effect as described for KILL SESSION IMMEDIATE.
    basically the difference is not between DISCONNECT and KILL SESSION, the difference exists if you allow pending/ongoing transactions to finish(IMMEDIATE vs POST_TRANSACTION)
    Edited by: Keilor on Jun 25, 2012 12:57 PM
    Edited by: Keilor on Jun 25, 2012 1:39 PM

  • Kill session script error

    Hello,
    I have create kill session script but while execute getting error. find the below scripts.
    (script name is t.sh)
    sqlplus -s '/as sysdba' << EOF
    alter user test account lock;
    spool kill_session.sql
    set heading off;
    select 'alter system kill session ' || '''' || sid || ',' || serial# || '''' || ' immediate;' from v$session
    where username ='TEST';
    spool off;
    *@$ORACLE_HOME/scripts/kill_session.sql*
    EOF
    Error:_
    *[oracle@indpund0201 scripts]$ ./t.sh*
    User altered.
    select 'alter system kill session ' || '''' || sid || ',' || serial# || '''' || ' immediate;' from v
    ERROR at line 1:
    ORA-00942: table or view does not exist
    Please suggest.

    RK wrote:
    select 'alter system kill session ' || '''' || sid || ',' || serial# || '''' || ' immediate;' from v$session
    where username ='TEST';
    The $ character has a special meaning in shell scripting. The shell will read it as follows:
    .. from v${session}
    where:
      $session = environment variableAs there is no such variable the code will be parsed as follows:
    .. from vAnd thus result in the following error (table/object called v does not exist):
    select 'alter system kill session ' || '''' || sid || ',' || serial# || '''' || ' immediate;' from v
    ERROR at line 1:
    ORA-00942: table or view does not exist
    Solution - escape the $ character as follows:
    .. from v\$sessionIt should work...

  • Regarding Alter System Kill Session

    Hi Guys,
    I have to do db refresh from the build .For this I have to kill the sessions and drop the users and recreate the users with the latest build.As the application is running and there are some idle sessions, I have to kill the sessions and drop the users for that I am using a code as below
    DECLARE
    v_alt_stmt VARCHAR2(1000) := 'ALTER SYSTEM KILL SESSION ''';
    v_kill_stmt VARCHAR2(1000);
    CURSOR cur_session IS
    SELECT s.type type,
    s.sid sid,
    s.serial# srl_no,
    s.username user_name,
    s.PROGRAM prog_name
    FROM v$session s JOIN gv$process p ON p.addr = s.paddr and s.type='USER';
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SYSTEM ENABLE RESTRICTED SESSION';
    DBMS_OUTPUT.PUT_LINE('The Session has been put in the restricted mode');
    FOR v_cur_ssn IN cur_session
    LOOP
    BEGIN
    v_kill_stmt := v_alt_stmt || v_cur_ssn.sid || ',' || v_cur_ssn.srl_no || '''';
    DBMS_OUTPUT.PUT_LINE(v_kill_stmt);
    EXECUTE IMMEDIATE v_kill_stmt;
    EXCEPTION
    WHEN others THEN
    -- DBMS_OUTPUT.PUT_LINE('The current sessions sid is ' || v_cur_ssn.sid || ' and the srl no is ' || v_cur_ssn.srl_no || ' can not be killed');
    END;
    END LOOP;
    EXECUTE IMMEDIATE 'ALTER SYSTEM DISABLE RESTRICTED SESSION';
    DBMS_OUTPUT.PUT_LINE('The restricted mode of the system has been removed');
    END;
    But sometimes after killing the sessions there are some os processes are going on,to avoid that I have to use 'ALTER SYSTEM DISCONNECT SESSION ''' and 'MMEDIATE' it is workig fine .
    Can Any one tell me the logical difference between kill sessions and disconnect
    Any information will be highly appreciated.
    Thanks in advance
    Prafulla

    >
    Can Any one tell me the logical difference between kill sessions and disconnect
    >
    Disconnect can be used to disconnect immediately without waiting for any ongoing transactions to complete and recovers all session resousrces.
    Kill rolls back ongoing transactions and partially recovers session resources.
    Kill is simiilar to SHUTDOWN IMMEDIATE while disconnect is more like SHUTDOWN ABORT.
    See DISCONNECT SESSION Clause in the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_2013.htm
    >
    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.
    >
    And KILL SESSION in the same doc next section
    >
    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.

  • Regarding kill session

    Hello Everybody,
    I am new to Oracle. I have few questions regarding session kill.
    1)Does “killed” session consume any system resources like RAM, CPU?
    2)Whether one should kill the process rather than the session?
    3) Does ALTER SYSTEM KILL SESSION command kill both user session and server process?
    With Regards.

    1)Does “killed” session consume any system resources like RAM, CPU? Killed Status In v$Session Indicates PMON is too busy to clean up.
    You could refer to
    http://www.oracle-base.com/articles/misc/KillingOracleSessions.php
    2)Whether one should kill the process rather than the session?Refer to
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4974573906087
    3) Does ALTER SYSTEM KILL SESSION command kill both user session and server process?session is not a process, a process is not a session.
    please refer to Tom Link.

  • Kill Session

    Hi,
    Can someone please help. I just booted up my server (dev server)to try to get rid of some user sessions. I typed the following
    SELECT SID,SERIAL#,TYPE,STATUS FROM V$SESSION;
    It returned background processes which I understand but what I don't understand is that I show 5 user processes that all active! I should be the only user on the return. I tried everything to get rid of these bogus users but to no avail with a statement such as
    ALTER SYSTEM KILL SESSION '7, 97' IMMEDIATE;
    and returns and Ora error:Ora-00030 User session ID does not exist.
    Can anyone enlighten me on a command that will eliminate these bogus user sessions?
    It would be very much appreciated.
    Thanks in advance.
    Al

    Hi,
    The user working with apps 11i or 11.0.3?
    Straight a way you can kill the process in the windows taskbar.
    Second thing is restart the client system.
    Killing using alter system session is not adviceable.
    Back in the server level automatically will be killed up.
    All the best.
    Thanks and Regards
    Riyas
    [email protected]

  • 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

  • Alter system kill session always gives ORA-00030

    Hello
    Im writing a tool for oracle and one of its features requires killing user session (Im connecting with JDBC). The database Im testing on is 11.2.0.2.
    I find the sid and the serial# without problems, than I issue the "alter system kill session 'x,y' immediate" command.
    So far so good, but I always get an ORA-00030 error saying this session cannot be found.
    I double check and the session does exist in the database.
    Because I want the tool to make the kill, killing via the OS is not an option.
    Its doesn't look like a permission problem because it gives the same error even when connected as system.
    Whats wrong ? does this kill command work at all ? Whats its limitations ?
    Thanks
    Guy Shilo
    Edited by: user13266377 on Jun 9, 2011 1:15 AM

    user13266377 wrote:
    Hello
    Im writing a tool for oracle and one of its features requires killing user session (Im connecting with JDBC). The database Im testing on is 11.2.0.2.
    I find the sid and the serial# without problems, than I issue the "alter system kill session 'x,y' immediate" command.
    So far so good, but I always get an ORA-00030 error saying this session cannot be found.
    I double check and the session does exist in the database.
    Because I want the tool to make the kill, killing via the OS is not an option.
    Its doesn't look like a permission problem because it gives the same error even when connected as system.
    Whats wrong ? does this kill command work at all ? Whats its limitations ?
    Thanks
    Guy Shilo
    Edited by: user13266377 on Jun 9, 2011 1:15 AMyou cannot kill the session already killed or disconnected from the session.
    refer the link:- this may help you to write scripts to kill session using dbms_scheduler
    Grant restricted and kill sessions.

  • Alter System Kill Session Not Working

    I'm not certain as to what the problem may be, but the following code does not work in that the session is not being disconnected.
    The attempt is to have this trigger kill a user's logon session if the user is attempting to run a program named 'ex_oc.exe'
    I've tested the code (getting the values back to the table as expected) and it appears to be working but it doesn't execute.
    I've also tried ''ALTER SYSTEM DISCONNECT SESSION'.
    Database is 11g.
    Any ideas?
    Thanks
    CREATE OR REPLACE TRIGGER SYS.DENY_MSB_TRIGGER_UPDATEDD
    AFTER LOGON ON Database
    DECLARE
    v_programname varchar2(64);
    v_logontime date;
    v_process varchar2(24);
    v_machine varchar2(64);
    v_sid number;
    v_serialnum number;
    v_username varchar2(30);
    v_stmt2run VARCHAR2(327);
    cur INTEGER;
    ret INTEGER;
    v_string VARCHAR2(500);
    BEGIN
    SELECT PROGRAM, PROCESS, MACHINE, SID, SERIAL#, USERNAME
    INTO v_programname, v_process, v_machine, v_sid, v_serialnum, v_username
    FROM V$SESSION
    WHERE PROGRAM = LOWER('ex_oc.exe');
    INSERT INTO SAUDIT.DENYMSB (PROGRAM, PROCESS, MACHINE, SID, SERIALNUM, USERNAME)
    VALUES (v_programname, v_process, v_machine, v_sid, v_serialnum, v_username );
    v_string := 'ALTER SYSTEM KILL SESSION' || CHR(39)||v_sid||','||v_serialnum|| CHR(39)||' IMMEDIATE';
    EXECUTE IMMEDIATE v_string;
    END;
    Edited by: user12451703 on Jan 14, 2010 8:57 AM
    Edited by: user12451703 on Jan 14, 2010 8:58 AM

    user12451703 wrote:
    I'm not trying to kill my own session.
    Trigger written by Sys and running it as a generic user.You completely misunderstand triggers. Same as SP/SF trigger is always executed in invoking session on behalf of trigger owner. Below is a slighly modified version of your trigger that does not allow user U1 to connect by killing user U1 session:
    SQL> connect scott as sysdba
    Enter password: *****
    Connected.
    SQL> CREATE OR REPLACE TRIGGER SYS.DENY_MSB_TRIGGER_UPDATEDD
    2 AFTER LOGON ON Database
    3 DECLARE
    4 v_programname varchar2(64);
    5 v_logontime date;
    6 v_process varchar2(24);
    7 v_machine varchar2(64);
    8 v_sid number;
    9 v_serialnum number;
    10 v_username varchar2(30);
    11 v_stmt2run VARCHAR2(327);
    12 cur INTEGER;
    13 ret INTEGER;
    14 v_string VARCHAR2(500);
    15 BEGIN
    16 SELECT PROGRAM, PROCESS, MACHINE, SID, SERIAL#, USERNAME
    17 INTO v_programname, v_process, v_machine, v_sid, v_serialnum, v_username
    18 FROM V$SESSION where username = 'U1';
    19 EXECUTE IMMEDIATE ('ALTER SYSTEM KILL SESSION ''' || v_sid || ',' || v_serialnum || '''');
    20 EXCEPTION
    21 WHEN OTHERS THEN
    22 RAISE_APPLICATION_ERROR(-20001, 'Execution of this program not allowed', TRUE);
    23 END;
    24 /
    Trigger created.
    SQL> create user u1 identified by u1
    2 /
    User created.
    SQL> grant create session to u1
    2 /
    Grant succeeded.
    SQL> connect u1/u1
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20001: Execution of this program not allowed
    ORA-06512: at line 20
    <font color=red size =2>ORA-00027: cannot kill current session</font>
    Warning: You are no longer connected to ORACLE.
    SQL>
    Also, user not that keen to change the name of the exe.Is cex_soc.exe client side executable? If so what prevents user from renaming it?
    SY.

  • User cannot dropped after run "Kill Session" command

    Hi ,
    I’m facing problem with oracle user,
    Oracle 10G R(2).Windows Xp
    Application in .NET
    1)I create user:
    2)Then I check current session using this select”
    "SELECT SID, SERIAL# FROM V$SESSION WHERE UserName =
    3)Then I execute this statement from application”
    ALTER SYSTEM KILL SESSION '{sid},{serialno}' IMMEDIATE”
    4)In our scenario user is no more connected.
    5) Now when we run below this statement from application oracle gives an error”CANNOT DROP THE USER THAT IS CURRENTLY CONNECTED”
    DROP USER {0} CASCADE
    Please advice.
    Faheem Latif

    Comments embedded
    Hi ,
    I’m facing problem with oracle user,
    Oracle 10G R(2).Windows Xp
    Application in .NET
    1)I create user:Please post complete command
    >
    2)Then I check current session using this select”
    "SELECT SID, SERIAL# FROM V$SESSION WHERE UserName =
    Please post the complete command.
    3)Then I execute this statement from application”
    ALTER SYSTEM KILL SESSION '{sid},{serialno}'
    IMMEDIATE”
    Please post the complete command
    4)In our scenario user is no more connected. How did you verify? Please post the complete command.
    >
    5) Now when we run below this statement from
    application oracle gives an error”CANNOT DROP THE
    USER THAT IS CURRENTLY CONNECTED” So the user is still connected.
    Which user are you trying to drop? Yourself?
    Again, please post the complete command.
    >
    DROP USER {0} CASCADE
    Please advice.
    Faheem LatifMy advice is you either provide sufficient detail, including all commands, and stop relying on crystal balls and fortunetellers.
    No one here was looking over your shoulder, so no one can tell what happened, without you providing sufficient clues. I agree with you this is cumbersome, and doesn't comply with your custom to dump everything here, not doing any research yourself.
    Sybrand Bakker
    Senior Oracle DBA

  • KILL SESSION Procedure

    i have created a procedure that I will check for open sessions and then kill them. I tried to compile this procedure using sqldeveloper and the output i got was Warning: execution completed with warning. package body Compiled. I then go and look for the package and i don't see it on the database. Here is my package and procedure...what am i doing wrong here? Is my syntax incorrect?
    create or replace
    package body pkg_sess_kill as
    procedure sp_sess_kill is
    --DECLARE
    v_sid number;
    v_serial# number;
    v_username varchar2(30);
    CURSOR checkuser IS
    select sid,serial#,username
    from v$session
    where username IN ('CMSLOGGER',
    'CMS2WIRE',
    'SMS2WIRE');
    BEGIN
    OPEN checkuser;
    FETCH checkuser into v_sid,v_serial#,v_username;
    EXIT when checkuser%NOTFOUND;
    IF v_username is not null THEN
    ALTER SYSTEM KILL SESSION 'v_sid,v_serial#' IMMEDIATE;
    END IF;
    CLOSE checkuser;
    END sp_sess_kill;
    END pkg_sess_kill;

    I understand that this is probably not the best way to address my problem. I am just starting off and still learning. I honestly just want my procedure to work and don't understand why it doesn't. I will look into other alternatives, but still would like to understand why it doesn't work.
    Here is my procedure that will check for open sessions by particular usernames, and then kill the sessions if these usernames exist in the v$session view.
    create or replace
    procedure sp_sess_kill AS
    --DECLARE
    v_sid number;
    v_serial# number;
    v_username varchar2(30);
    CURSOR checkuser IS
    select sid,serial#,username
    from v$session
    where username IN ('USER1',
    'USER2',
    'USER3');
    BEGIN
    OPEN checkuser;
    LOOP
    FETCH checkuser into v_sid,v_serial#,v_username;
    EXIT when checkuser%NOTFOUND;
    IF v_username is not null THEN
    execute immediate 'alter system kill session '||chr(39)||v_sid||','||v_serial#||chr(39);
    END IF;
    END LOOP;
    CLOSE checkuser;
    END sp_sess_kill;
    The problem now is that i am getting the error msgs:
    Error(8,15): PL/SQL:SQL Statement Ingored
    Error(9,20): PL/SQL: ORA-00942: table or view does not exist.
    This is odd because when i run the sql by itself outside the procedure block, i get a result set:
    SID SERIAL# USERNAME
    511 5105 USER1
    516 7875 USER2
    Please advise.

  • Oracle Killing Sessions

    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 TEST INACTIVE
    141 54482 TEST 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.
    Thanks,
    Moorthy.GS

    Hi,
    I locked that user also i killed again some inactive session and tried to drop that user. It works.
    Thanks...
    May know what is the reason, it generates new sessions.
    Cheers,
    Moorthy.GS

  • Restricted session & Kill Session

    Hello everybody,
    1) In which case do I need enabled restricted sessions?
    2)Where “ALTER SYSTEM KILL SESSION” command will be useful?
    Thanks in advance

    Salman Qureshi wrote:
    Hi,
    1) In which case do I need enabled restricted sessions?Whenever you want to perform some maintenance operations in your database and you don't want anyone to access the database except user SYS, you can enable restricted session.
    2)Where “ALTER SYSTEM KILL SESSION” command will be useful?When you want to kill a session which is no longer responding or hung or doing some long running operation which is disturbing your performance or you want to stop that processing etc.
    SalmanHi Salman,
    I think you'll find that "restricted session mode" does not limit login ability to only the SYS user as you mention.
    As an example, consider the following.
    Session 1:
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 1 22:07:03 2013
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    SQL> connect / as sysdba
    Connected.
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup restrict;
    ORACLE instance started.
    Total System Global Area 2137886720 bytes
    Fixed Size                  2256912 bytes
    Variable Size            1258295280 bytes
    Database Buffers          872415232 bytes
    Redo Buffers                4919296 bytes
    Database mounted.
    Database opened.
    SQL>Session 2:
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 1 22:07:51 2013
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    SQL> connect markwill
    Enter password:
    Connected.
    SQL> select logins from v$instance;
    LOGINS
    RESTRICTED
    1 row selected.
    SQL>As you can see in Session 2 I am clearly not connecting as SYS user, yet I am capable of connecting to an instance started in restricted mode.
    Rather than limiting to only user SYS it limits login ability to users with the RESTRICTED SESSION System Privilege (granted directly or via role).
    Regards,
    Mark

Maybe you are looking for

  • Hi i have a site form Google with Google Gadget

    Hi i have a Google site with Google Gadget "Flash Wrapper" and i open a swf file. when i open the site with Google Crome The swf take a lot of time to load but with explorer there is no delay Here is link to the page with the swf file פיצה what can i

  • Configure Formula dialog not being displayed

    I have just installed LabVIEW and I am working thru the tutorials in the Getting Started Manual.  I am at the point where I am adding a Formula to the Generate and Display example VI.  When I place the Formula Express VI on the block diagram I expect

  • Not able to connect my Iphone to my WRT54GS router with security enabled

    As the subject line states, I'm not able to connect my Iphone to my WRT54GS router when the security is enabled. When ever I attempt to connect to my network with my phone it always tells me the password is incorrect. I have double checked the passwo

  • Where is the source panel?

    In order to restore my iPod (cause its nothing but a pain in the rear!) I have to do the following: After a few moments, your iPod will appear in the Source panel in iTunes. Select your iPod in the Source panel and you will see information about your

  • Exercise PP 20 of Global Bike

    Exercise PP 20 reports "A master record for D010/Labor exists only in 2008.  (E KL 002) I am working with Chico Client 310 and 315 of Global Bike and get no labor costs from the Production Planning Exercises.  This Exercise goes to my classes next Tu