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.

Similar Messages

  • Can I disable logging for session in Oracle 10g?

    I use a procedure to delete a lot of row for an application repeatedly. Because the DELETE statement is time consuming and the data don't need to be archived, I decide to use the nologging option.
    How to do it?
    What is the best choice? Can I disable logging from session in Oracle 10g?
    Thank you
    Edited by: jetq on Jul 23, 2009 9:46 AM

    Hi,
    "Delete" without generating redo-log is not possible.
    If you are on 10g, one way of making this thing efficiant is partition the table, with range-list partitioning. Partitioning existing table will be an excercise in itself, but that will be one time activity.
    In partitioned (or sub-partitioned) tables, you can truncate a partition (or subpartition). That won't generate any redo log (or very very less redo log) and that runs in seconds.
    In your case if you range partition INCOMING table by datetime (1 partition per day) and list sub-partition it by STATUS, that would help.
    Another approach is, if you are deleteing, say 80% records every day and leaving 20% (or very less) records. What you can do is, partition the table only by range on datetime. Then, every time you want to delete data, copy the rows you want to keep in some other table (or temporary table), truncate partition for that day and insert rows back (which you want to keep).
    I have done a similar thing and it works very quickly and generates very less redo log. Redo log generated in case of truncating partition or creating new partitions is just for Oracle internal commands (like data dictionary update etc).
    Have fun.

  • Lots of Inactive perl sessions in Oracle 10g r2 on Debian Linux 64 bit

    Hi,
    There are lots of Inactive perl session in Oracle 10g release 2 10.2.0.3.0 on Debian Linux 64 bit, is it normal
    ps aux|grep oracle is showing following in processes of perl
    /home/u01/app/oracle/product/10.2.0/database1/perl/bin/perl /home/u01/app/oracle/product/10.2.0/database1 /sysman/admin/scripts/db/dbarchfull.pl

    Hi,
    There are lots of Inactive perl session in Oracle 10g release 2 10.2.0.3.0 on Debian Linux 64 bit, is it normal
    ps aux|grep oracle is showing following in processes of perl
    /home/u01/app/oracle/product/10.2.0/database1/perl/bin/perl /home/u01/app/oracle/product/10.2.0/database1 /sysman/admin/scripts/db/dbarchfull.pl

  • How to block Sql Plus sessions in Oracle 10g

    Hi,
    I want to block all sql plus sessions in oracle 10g, as we have a application and we need each and every one to use this application not the sql plus session.
    Kindly update us as soon as possible. and also thanks in advanced.

    Understand the concept Karl, but a layered defense seldom works in the IP world. If I manage to get through the firewall, then how can you prevent me access, at IP level, at any other ISO stack layer? If you manage to get through, then your firewall policies could just be too weak :) at least you must have some kind of an IDS infrastructure in place..
    what I mean is, you can have infinite number of threats.. and this will be part of your Risk Analysis. Determining all possible threats to the assets, what are being protected and their associated value, and predicting the rate of occurrence.... with all of these you could probably come up with contingency plans and incident response.. And most of all, you should not ignore the fact that people are creative, ingenious, and curious, and they'll prove this to you by testing your security implementations. So you'll have to periodically evaluate your security.. that's why there are audits.. Also, you must balance Security, Performance, Usability, and your Budget.
    Yes, you can argue that if the entire firewall goes down (thus no IP defense), then something like DBV (or even denying IPs in sqlnet) can provide some defense. But is that not then a case of too little too late? It's better too little too late, than no protection at all... Imagine if there's no DBV, or if you have not implemented the concept of "Least Privilege"? or if the backups and exports are not encrypted? That would be more devastating.. that's the importance of database security options and features in providing "defense in depth"
    I question just what purpose and how effective IP packet security is at higher layers. It can never substitute doing this instead at firewall level. Well, it's not all about network security. All facets must be considered and the inter-relationships should be understand. Like the core information security and access management, physical and personnel security, training them, etc... And all of these are equally important in providing a secure ecosystem
    As for security that relies on the client to pass secure data (like executable name or o/s user name)... all this can easily be spoofed. Even if the app and Oracle driver are somehow digitally signed and these signatures can be verified on the server side, we only need to look at Vista to see how secure this really would be. Microsoft attempted to encrypt every single h/w and s/w layer from the physical DVD track to the pixel on the monitor.. and this was defeated. And this was done as o/s kernel level. It is less complex to hack at driver level and even trivial to do it at application level.Security is about risk management. Blocking SQL*Plus does not negate the risk of SQL from the wild being run on a production server. For example, the client is a VB client using ODBC. It is easy to create a proxy that accepts the ODBC connection from the VB client and proxy the OCI packets to the real Oracle server. Now you have a man-in-the-middle than can inspect every single SQL call made to Oracle, and inject any PL/SQL or SQL code it wants.
    Security is far beyond writing a login trigger to deny SQL*Plus sessions and calling that a defense. >
    Yes I agree with you. That's why there are independent organizations and regulating bodies that provides security best practices, to give us a headstart on comming up of strong security policies.
    And one of my favorites is the one provided by IASE (sponsored by Defense Information Systems Agency) where there's lot of content regarding hardening and policies
    http://iase.disa.mil/stigs/stig/index.html
    http://iase.disa.mil/stigs/checklist/index.html
    http://iase.disa.mil/stigs/SRR/index.html
    - Karl Arao
    http://karlarao.wordpress.com

  • Killing Sessions in Oracle

    Hai all..
    I need the solution of how to kill the session after the time has elapsed..
    say
    if the database is idle for 5 minutes. then the session should be automatically dropped .
    I use VB/ORacle.
    Do anyone know how to kill the session in oracle from any front end say Visual Basic / any other front end.
    IS there a possibility to close the session.
    kndly let me know the solution for this problem.
    Thanx in advance
    Gayathri

    maybe you can do it through oracle user's profile.
    you can try to look into proper oracle docs. Yes, see the idle_time resource parameter of the create profile statement:
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96540/statements_611a.htm#2066026

  • New sessions in oracle 10g

    I would like to know how many new sessions and user I/O between 9.00am to 12.00PM and 1.00Pm to 4.00PM every day
    any scripts run in cron job

    created trigger like this but I am getting
    Warning: Trigger created with compilation errors.
    what is problem in the trigger script
    SQL> CREATE TABLE LOGIN_AUDIT_INFO_ALL
    username varchar2(30),
    session_id number(8),
    client_hostname varchar2(30),
    client_ip_address varchar2(16),
    login_time varchar2(10)
    Table created.
    SQL> create or replace trigger login_audit_dblevel
    2 AFTER LOGON ON DATABASE
    3 DECLARE
    4 usr varchar2(30);
    5 ssn_id number(8);
    6 chost varchar2(30);
    7 cip varchar2(16);
    8 clogin varchar2(10);
    9 BEGIN
    10 select sys_context(.USERENV.,'SESSION_USER.) into usr from dual;
    11 select sys_context(.USERENV.,'SESSIONID.) into ssn_id from dual;
    12 select sys_context(.USERENV.,'HOST.) into chost from dual;
    13 select sys_context(.USERENV.,'IP_ADDRESS.) into cip from dual;
    14 select to_char(SYSDATE,.HH24:MM:SS.) into clogin from dual;
    15 insert into login_audit_info_all values(usr, ssn_id,chost,cip, clogin);
    16 end;
    17 /
    Warning: Trigger created with compilation errors.
    SQL>

  • How to check Locking sessions in oracle 10g

    Hi,
    I have tried to get locking sessions. i got the blocking session by using v$lock view.
    Pls help how to get locking sessions.
    Regards,
    Venkat

    Hi Venkat
    Or just run this independent of database version
    select a.sid blocker, 'is blocking the session ', b.sid blockee from v$lock a, v$lock b
    where a.block =1 and b.request > 0  and a.id1=b.id1 and a.id2=b.id2;You can extend this query to find the username and machine (plus all other details) from v$session using the a.sid and b.sid from above
    To find the blocking session_
    SELECT S.SID, S.SQL_ID, S.USERNAME, S.MACHINE from
    V$SESSION S WHERE S.SID  = (SELECT blocker from
    (select a.sid blocker, 'is blocking the session ', b.sid blockee from v$lock a, v$lock b
    where a.block =1 and b.request > 0  and a.id1=b.id1 and a.id2=b.id2
    *_To find the blocked session_*SELECT S.SID, S.SQL_ID, S.USERNAME, S.MACHINE from
    V$SESSION S WHERE S.SID = (SELECT blockee from
    (select a.sid blocker, 'is blocking the session ', b.sid blockee from v$lock a, v$lock b
    where a.block =1 and b.request > 0 and a.id1=b.id1 and a.id2=b.id2
    Edited : Added blocker and blockee code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • No of maximun users in oracle 10g express edition

    what is the maximum number of concurrent users (session) in oracle 10g express edition.
    coz right now, we have one server with oracle 10g express edition, and a front end application of asp.net (.net 1.1)

    The only limit that Oracle places on the number of concurrent users on an XE database is through the limit of 1GB of RAM. You can have as many concurrent sessions as you can open in 1GB of RAM.

  • How many sessions can run simultaneously in oracle 10g database

    Dear Experts,
    Please tell me .
    Thanks

    Going into further details, if you are asking about number of concurrent sessions >that can access a block then it is defined by the INITRANS and MAXTRANS >parameters for the segment (which defaults to 2 for table segment, 1 for index >segment). There is more to say about that ITL slots: for Oracle 9i at least there can only be a maximum of 255 ITL slots whatever the data block size: for small block size, the maximum of ITL slots is about 50% of the data block size and and can be lower than 255.
    See Metalink note:
    Subject: INITRANS relationship with DB_BLOCK_SIZE.
    Doc ID: Note:151473.1 Type: BULLETIN
    Last Revision Date: 27-SEP-2006 Status: PUBLISHED
    I don't know if this is still valid for Oracle 10g.

  • Create huge Waited-Session in a particular moment in Oracle 10g

    Friends,
    I m new in Oracle 10g database . I m working in a bank and Our production server runs in Oracle 10g in AIX server . We also running an application server with Oracle 10g database . Recently I got a strange problem in my production server .I have a schema called 'schemafe' which contains all of our users who are using the application mainly. They connect into my database via this schema .
    Now recently , the users of this schema increase the "WAITED-SESSION" in our production server . And at that moment another users are hanged on . And after 10/15 minutes it becomes normal .
    In this situation, can anybody plz help me to give a suggestion that how can I tune my database and remove this type of problem ? And for this situation , which things I need to tune or monitor .
    Waiting for ur kind reply .. ..

    Friends,
    I m new in Oracle 10g database . I m working in a bank and Our production server runs in Oracle 10g in AIX server . We also running an application server with Oracle 10g database . Recently I got a strange problem in my production server .I have a schema called 'schemafe' which contains all of our users who are using the application mainly. They connect into my database via this schema .
    Now recently , the users of this schema increase the "WAITED-SESSION" in our production server . And at that moment another users are hanged on . And after 10/15 minutes it becomes normal .
    In this situation, can anybody plz help me to give a suggestion that how can I tune my database and remove this type of problem ? And for this situation , which things I need to tune or monitor .
    Waiting for ur kind reply .. ..

  • Maximim Number of process and session can set in oracle 10g

    my os is 32 bit windows and ram size is 10gb and i am using AWE_WINDOW_MEMORY setting and now my sga is 6 gb.what would be Maximim Number of process and session can set in oracle 10g database

    mithun wrote:
    my os is 32 bit windows and ram size is 10gb and i am using AWE_WINDOW_MEMORY setting and now my sga is 6 gb.what would be Maximim Number of process and session can set in oracle 10g databaseThe maximum number of sessions is controlled by your database's SESSIONS parameter. This value is most derived from the PROCESSES parameter. You cannot exceed this number of sessions unless you raise the parameter value.
    If your database is configured to handle enough sessions, then Oracle can literally handle thousands of simultaneous connections, provided your database server also has enough resources to handle this number of connections. You will want to implement Oracle's Shared Server connections so that multiple connections share a pool of processes on the database server. This minimizes the resource consumption used by the connections.
    Read the following document as well.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/manproc.htm
    Thanks

  • 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

  • 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

  • Open cursors problem- j2ee + oracle 10g

    Hi,
    I am using EJB on sunOne application server 8.1., Oracle 10g DB.
    EJB container connects to Oracle DB through a set of connection pools.
    BMP for all entity beans.
    I have about 160 PL/SQL functions that make up the business logic of the online application. everytime the application runs, I get an increasing number of open cursors, including some of the ones that are explicitly closed within PL/SQL (inspection with sys.v_$open_cursor).
    I made sure all CallableStatements, PreparedStatements, RecordSets within the beans are closed and set to NULL. All PL/SQL functions use explicit cursors, so every select statement is managed within a cursor which is explicitly closed when the function finishes with it.
    From v$open_cursor, I identified the sessions with the cursors still open, and issued (ALTER SYSTEM KILL SESSION �sid, #serial�) for each of the sessions (this is done via a PL/SQL function for all inactive sessions).
    These sessions have state INACTIVE, and wait_class IDLE. This has Killed all sessions, but I was not able to use the application anymore. I suspect by killing those sessions we have also caused the connections between EJB container and the Oracle DB. The only way to use the application now is to stop and restart the sunONE domain � this is very inconvenient.
    Has anyone encountered a similar problem? any suggestions to reduce or eliminate the open cursors number? Please help.
    Thank you all

    Maybe you can try to have a smaller steady-pool-size and idle-timeout-in-millis for your connection pools.
    Also, if that's at all possible, have smaller number of connection pools being shared by more apps.
    Just my 2c.
    thanks.

  • Oracle 10g Paremeter to Auto Roll Back uncommited transanctions

    Hi all
    In SME Segment - People donot affort having Oracle Dba and at the same time less experienced persons keep making their own tests
    Situation goes as under :-
    a) Oracle 10g Windows 2003 64 Bit version on Branded HP Server with 8GB Ram having around 100 simultaneous users
    b) User A on Machine A fires command say
    Table Iledg has inventory data say around 2 Million records
    Update iledg set gwt = netwt + corewt where vrdate >= ??? and vrdate <= ??
    Records get updates - But user A does either of the following
    i) Does not give commit
    ii) Preses Ctl + Alt + Del
    iii) Switches off the Computer
    Problem
    All other users get hanged for their Transanctions relating to table Iledg. EDP person is not able identify the culprit i.e User A
    We have already tried - that if we kill the session of User A , position becomes OK
    Solution wanted for
    a) Set some Oracle Parameter which automatically rolls back un committed transnactions for say 5 Minutes
    b) Oracle automatically kills those sessions who have un commited transanctions for more than say 5 minutes.
    Because in SME Segment - It is very difficult to ask the users to fire some very technical commands to find out the culprit and to kill their sessions. At the same time we can not start the server again and again.
    Suresh Bansal

    Thanks for the reply.
    We were also very sure about Oracle 10g beharviour but it actually does not happen in abnormal disconnections.
    We tested this way
    a) Table Iledg has inventory data say around 2 Million records
    Machine A fires command say
    Update iledg set gwt = netwt + corewt where vrdate >= ??? and vrdate <= ??
    Oracle Results -> ?? rows updated ->Did not gave commit command ->Intentionally to test it switched off the machine without Exiting from
    SQL*Plus
    then on Machine B)
    Again tried to
    Update iledg set gwt = netwt + corewt where vrdate >= ??? and vrdate <= ??
    Session of Machine A is not killed by Oracle 10g and is blocking the Transanction of Machine B which is very unfortunate as we thought Oracle 10g must have killed the session of Machine A when he switched off his Machine. When blocking_session of Machine A is killed ->Position becomes absolutely OK and normal.
    This can be tested in just 2 minutes at your end.
    Kindly suggest some workable remedy to overcome such abnormal client disconnections. Setting Profile idle time is not the workable solution as we create Oracle Connection at the start of VB6 application and that connection goes on thru out applications for all reports and transanctions.
    This kind of problem is not faced in last 6 years over the same forms. But now the client network has grown to say 700 Computers and is creating problems intermittently which is diagnosed properly and terminates the Oracle Connections which sometimes creates these kinds of problems.
    Suresh Bansal

Maybe you are looking for

  • PC cannot read my E51 2Gb Sandisk microSD memory c...

    The Sd works just fine in my Nokia E51 but transfering (large) files to the phone is terribly slow so I tried to copy the files using the microSD adapter and my mmc reader as I was sure this was going to faster but for some strange reason the microSD

  • How to put blob to external file (Help!?)

    hi, I am a beginner in oracle. Now i use sql*loader and put some jpg,rm files in blob(jpg->blob) , but,in reverse, i don't know how to extract blob and put it in my OS(blob->jpg).......>_< thanks d.t.

  • HowTo:  Show Non SAP forms properly?

    I have tried ... Public Sub New()      frm.Show()      frm.Visible = False End and then to show the form finally frm.Visible = True. <i>Is there a more proper way to show a visual studio form?</i>  I can't just instance the form (dim frm as Form1) or

  • Weirdly I am unable to reply to or send new emails during the week.

    for the past 2 weeks I have been unable to send emails via my server Talk Talk during Monday - Thursday.  A message comes up saying "Cannot send mail using server smtp.talktalk.net"   This week looks like being the same.  Mt husband has an account on

  • Why can't I restore from a backup (backup file made from another Z10 now gone)

    I made a backup yesterday from my old Z10 (now exchanged and security wiped) I want to restore to my new Z10. But Blackberry link (1.2.1.18) won't open the backup, it's greyed out and it says 'can't find any backup from this phone'. How do I restore