Search

Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Monday, 17 December 2012

Killing Session with TOAD

You need to have DBA privilege to carry out such activity using toad, click on Session Browser, expand the program under program list, select the intended process; on the top click on Kill X button. You can see here not only the session and their SQL statement, cursor, explain plan and DML progress but you can see the database lock, blocking locks, database object being accessed and activities of rollback segment
Open the Database --> Monitor --> Session Browser tab or directly clicking on the session toolbar button and find the ACTIVE one and press the X button. The session will be killed immediately.
SQL>Select * from v$session where type = 'USER' and status = 'ACTIVE';
Take the sid and serial# values from there and use the below command to kill particular session.
SQL>alter system kill session 'sid, serial#';
Once you get the sid you can get the username from v$session
SQL>Select username from v$session where sid=23;
This command Toad issue to kill the process is of form:
SQL>ALTER SYSTEM DISCONNECT SESSION ‘SID#, SERIAL#’ IMMEDIATE;

As the Monitoring and killing session is routine DBA task. Therefore you can schedule it using toad after each time toad open or session open it will automatically launch this widow. For more details check the option View –> Toad Option –> startup

3 comments:

  1. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
    Regards,
    Oracle Training in Chennai|Oracle DBA Training in Chennai

    ReplyDelete
  2. Thanks for sharing such a great information..Its really nice and informative..
    hadoop training in chennai

    ReplyDelete
  3. Somebody necessarily help to make severely posts I might state. This is the first time I frequented your website page and to this point? I surprised with the research you made to create this particular post extraordinary. Well done admin..
    Oracle Training in Chennai

    ReplyDelete