Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003

    Unanswered: script to kill inactive sessions

    If anyone has script to kill inactive sessions pl. pass it on

  2. #2
    Join Date
    Jun 2004
    Provided Answers: 1
    The problem you could face with arbitrary killing of inactive sessions is that you may kill a session that was still running (it could have just completed one procedure & hadn't yet started another).

    Perhaps an easier way to accomplish what you want (although I'm guessing here at what it is you want to do!) is to set the users' profiles to automatically kill their session after a specified period of time e.g.

    create profile XXX
    idle_time 30;

    will create a profile called XXX that will disconnect users that are inactive for 30 minutes - you can then assign this profile to your users by:

    alter user [username]
    profile XXX;

    By default, all users use the oracle-supplied DEFAULT profile, so you can, if you wish,

    idle_time 30;

    Bear in mind that any changes to profiles will not take effect until you alter the resource_limit parameter to 'true' :

    alter system set resource_limit=true;

    Also, you need to consider what other parameters (if any) you may wish to set up or change within the profile.
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts