-
Hi ,
Oracle 8.1.7.0.0 OS- UNIX APPLICATION-Developer6i
I want to run a process from my apllication but before running that process I want all the users to close there sessions else it would be killed after 3 minutes.How could this be done.The job I want to run is run through event on the button.
Thanks.
-
-
You can use DBMS_PIPE, DBMS_ALERT and Advanced Queuing to pass messages. Unfortunately, all of these methods require that you application be written to listen for a message. I can't think of anything that will accomplish what you want without a rewrite of your application.
You could always use the UTL_SMTP package to email everyone with a warning.
Cheers
-
-
Please try this lines this way you will kill all users
set echo off
set heading off
set feed off
set term off
set linesize 300
set pagesize 0
col sid format 99999
col serial# format 99999
col osuser format a15
col username format a15
col spid format 9999999
spool /oracle8/killnow.sql
select 'alter system kill session ' || '''' || a.sid || ',' ||
a.serial# || '''' || ';'
from v$session a, v$process b
where a.paddr=b.addr
and a.username is not null
order by 1;
spool off
spool /oracle8/kill.sh
select 'kill -9 ' || b.spid
from v$session a, v$process b
where a.paddr=b.addr
and a.username is not null
order by 1;
spool off
@/oracle8/killnow.sql
!chmod 777 /dir_name/sql/kill.sh
sleep 180
/dir_name/sql/kill.sh
rm /dir_name/sql/kill.sh
rm /dir_name/sql/mataja.sql
exit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|