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.
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.
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....
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
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 .
html code is off
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.
Don't be afraid to try something new. Amateurs built the Ark, professionals built the Titanic
i second brhynold........ never use shutdown abort.
shutdown immediate or killing individual sessions thru the id is a cleaner way
Click Here to Expand Forum to Full Width