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

Thread: Messaging

  1. #1
    Join Date
    Feb 2002
    Location
    Dallas , Texas
    Posts
    158
    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.

  2. #2
    Join Date
    Feb 2002
    Location
    Dallas , Texas
    Posts
    158
    ANY REPLIES !!!

  3. #3
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    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
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: www.oracle-base.com
    My blog: www.oracle-base.com/blog

  4. #4
    Join Date
    Aug 2000
    Location
    Sao Paulo
    Posts
    114
    Which unix???

  5. #5
    Join Date
    Aug 2000
    Location
    Sao Paulo
    Posts
    114
    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
  •  


Click Here to Expand Forum to Full Width