Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Script to kill all user sessions before shutdown immediate

33 views
Skip to first unread message

jkwa...@my-dejanews.com

unread,
Jul 31, 1998, 3:00:00 AM7/31/98
to
We do a cold backup on Tuesday nights. unfortunately, users refuse to exit
before shutdown and we end up doing shutdown abort, startup, shutdown
immediate. I am afraid that someday the startup won't.

Is there a script I could use to kill all users (figuratively speaking, of
course) before the shutdown immediate. Thanks for any and all assistance.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

Richard Woods

unread,
Aug 1, 1998, 3:00:00 AM8/1/98
to jkwa...@my-dejanews.com
A shutdown immediate will terminate all user connections, rollback all
uncommitted transactions, and shutdown the database cleanly.

Derek Mott

unread,
Aug 1, 1998, 3:00:00 AM8/1/98
to
Some of my thoughts are:-
1) The final shutdown before an offline {cold} backup should be a shutdown
normal.
2) Some hangs were certainly possible with oracle 7.1.x when trying a
shutdown immediate. Shutdown abort covered this.
3) After the initial shutdown a startup restrict may prevent users logging
on etc before the shutdown normal. Never used it but
> shutdown immediate;
> startup mount;
> alter system set license_max_users=1;
> alter database open;
> {I sometimes like a little pause here}
> shudown normal;
Should also work, changing the immediate to an an abort if there's still
hangs.

- Derek J Mott

Richard Woods wrote in message <35C31C0F...@concentric.net>...

Daniel Clamage

unread,
Aug 5, 1998, 3:00:00 AM8/5/98
to
You could write a PL/SQL stored subprogram to SELECT sid, serial# FROM
V$SESSION for all logged on users besides SYS (who's doing the killing),
then execute a dynamic SQL statement ALTER SYSTEM KILL SESSION for each
sid, serial# found.

Give me a day and I'll write it and post it here, since it's something
folks could use.
--
- Dan Clamage
http://www.telerama.com/~dclamage
If you haven't crashed the Server,
you haven't been trying hard enough.

jkwa...@my-dejanews.com wrote in article
<6psmb6$ik5$1...@nnrp1.dejanews.com>...

0 new messages