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

Thread: Forcing Users Out of a Database

  1. #1
    Join Date
    Jan 2001
    Posts
    2

    Smile

    Hello, I wonder if anyone can help me?

    Is it possible to logoff a user from a database so a shutdown normal can be actioned. Users not logging out of the db (then going home) is causing our save script to hang as it performs a shutdown normal.

    Thanks

  2. #2
    Join Date
    Jul 2000
    Location
    Amsterdam
    Posts
    234

    Kill session

    Hi rimmer

    Manualy you can do a:

    alter system kill session SID, SERIAL#;

    on the user.

    You can find the SID and SERIAL# information in the v$session view.

    An other possibility would be to adjust the user profile setting an idle time of 1 hour.

    HTH

    tycho


  3. #3
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Mybe more appropriate option would be to use SHUTDOWN IMMEADIATE or SHUTDOWN TRANSACTIONAL instead of SHUTDOWN NORMAL in your script.

    Another thing: seting idle time in a profile does not help in this situation at all. If you set the allowed idle time to be 1 hour and your user forget to logg off, his/her session will remain connected even when the idle time is exceded. The disconnect will not occur before the user session tries to perform any action after this idle time is exceded. In other words, if your user doesn't logg off at the end of the working day, his session will remain open until next morning when he comes back to work and try to perform any action on the database within the same session. So it is in fact the session itself who triggers disconnection, not the sistem....
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  4. #4
    Join Date
    Jan 2001
    Posts
    2

    Talking

    Thanks For Your Help

  5. #5
    Join Date
    Jan 2001
    Posts
    60
    Its always good to use shutdown abort in that case ,if u want to save some data and then go for shutdown transactional (its in 8i only ),it doesnt allow to create new transaction .
    Thanks
    lnr
    html code is off

  6. #6
    Join Date
    Oct 2000
    Location
    Halifax, Nova Scotia
    Posts
    197
    Never use a shutdown abort unless you absolutely have to, if you do yuo will be caught doing instance recovery everytime you open the database. I assume you shutting down to do a cold backup or something so here is the best method to follow. In your script do the following:

    Shutdown immediate followed by a startup restrict then shutdown normal

    The shutdown immediate ensures the database closes even if users are still connected. Start up restrict starts the database up but only allows people with restricted session (i.e. DBA's) to start a session then the shutdwon normal ensures that the database is shutdown clean and all transactions have been rolled back and the redo logs are clean.

    Cheers
    Don't be afraid to try something new. Amateurs built the Ark, professionals built the Titanic

  7. #7
    Join Date
    Jan 2001
    Posts
    3
    i second brhynold........ never use shutdown abort.
    shutdown immediate or killing individual sessions thru the id is a cleaner way
    Balaji

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