DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Killing current session inside trigger

  1. #1
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    Don't laugh - we cannot change our schema password for some time due to application reasons.

    If I have my current SID and SESSION# in an ON LOGON trigger, how do I kill my own session?

    I will determine to-kill session OR not to-kill session by the OSUSER.

    Thank you!


  2. #2
    Join Date
    May 2002
    Posts
    2,645
    alter system kill session 'sid,serial#';
    where sid and serial# are enclosed by single quotation marks and come from v$session for the user session you want to kill. You can't kill your current session in this manner. You may want to go out to the system (you're on UNIX?) and kill the process.

  3. #3
    Join Date
    Jun 2002
    Location
    Denver
    Posts
    54
    if you are using on-logon trigger then you may not need to kill the session at all. Simply do not execute the default functionality trigger, depending upon your condition.

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    just do a raise in your trigger and you will be kicked out

Posting Permissions

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


Click Here to Expand Forum to Full Width