Tuesday, October 9, 2007

Send a Message to all logged in Users

REM
REM Script: send.sql
REM
Rem
Rem Name: Send.Sql
Rem Function: Send a message to all connect users on NT.
Rem Usage: Execute the file connected as SYS from SQL*Plus
Rem

Set Pages 0 Feed Off Term Off Echo Off
Spool Temp.Bat
Select Distinct 'Net Send ' Terminal ' Please log off now.'
From V$Session Where UserName Is Not Null and termnial is not null;
Spool Off
Host Temp
exit

3 comments: