Disclaimer: This will work only in Windows
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 terminal is not null;
Spool Off
Host Temp
exit