Home » RDBMS Server » Backup & Recovery » killing sessions prior to backing up a database
killing sessions prior to backing up a database [message #72466] Tue, 24 June 2003 12:23 Go to next message
Frank Kayne
Messages: 2
Registered: June 2003
Junior Member
Does anyone have a sql script that will kill all of the user (non-Oracle processes) sessions on a database that can be run prior to RMAN script for DB Backup.
Re: killing sessions prior to backing up a database [message #72467 is a reply to message #72466] Tue, 24 June 2003 22:01 Go to previous message
ctg
Messages: 146
Registered: July 2002
Senior Member
why do you want to kill all the user sessions?

through sqlplus:
SQL> @kill_users
where kill_users.sql looks something like this:

set heading off
set feedback off
spool kill.sql
SELECT 'ALTER SYSTEM KILL SESSION ''' || sid || ',' || 'serial#'';'
FROM v$session
WHERE username is not null -- you dont want to kill the background processes
AND username <> user; -- you dont want to kill your session
spool off
set echo on
@kill.sql
set heading on
set feedback on
Previous Topic: recover from cold backup
Next Topic: Restoring Database
Goto Forum:
  


Current Time: Sat May 25 10:09:18 CDT 2024