Presents your SQL SERVER E-NEWSLETTER for September 10, 2002 <-------------------------------------------> ISSUE A NET SEND VIA XP_CMDSHELL FOR USER NOTIFICATION Notifying users of an impending SQL Server shutdown is good practice for maintaining user goodwill and keeping managers apprised of the situation. A notification also allows users to inform you of critical business needs that may require a delay in the shutdown itself. The NET SEND Windows command can be issued to users connected to the server to notify them of an impending server shutdown. NET SEND /users parameter will notify all users who have a session on that server. The message parameter can be up to 128 characters long, allowing for a short message. To receive the message, the Messenger service on the user's client machine must be running and the user must be logged onto the server. To issue the NET SEND command, you can use the extended procedure xp_cmdshell. The following script illustrates a NET SEND message: exec master..xp_cmdshell 'net send /users "SQL Server is being shut down in 20 minutes. Please log off within 15 minutes."' ----------------------------------------