Message to all logged on users

  • Hi

    I have a vague recollection that years ago when I was a DBA there was a simple way to send a message to all logged on users of a server (so you could say things like "Server is shutting down in 2 minutes. Log out now"), but can't remember how to do it and can find nothing in BOL

    Any ideas, or have I just remembered this incorrectly.

    Cheers

    Sam

     

     

  • Hi Sam.

    From BOL...

    How to broadcast a shutdown message (Command Prompt)

    To broadcast a shutdown message

    • From a command prompt, enter:

      net send /users "message"

      For example:

      net send /users "SQL Server is going down in 20 minutes. Disconnect within 15 minutes."

      Note  The shutdown message can be broadcast only if an instance of Microsoft® SQL Server™ is running on Microsoft Windows NT® 4.0 or Windows® 2000. The users option specifies that the message be sent to all users connected to the server. For information about other net send options, see the Windows NT 4.0 and Windows 2000 documentation.

     

    ...or when you detach the database and you clear the connections, at that time you can also advise users.

  • Thanks Yvan

    Knew it had to be something

    Sam

     

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply