SQL Query Complete and Tone Internal PC Speaker

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • UpsideDownTire
    New Member
    • Oct 2009
    • 7

    SQL Query Complete and Tone Internal PC Speaker

    Hi,

    I am running SQL 2005 Server with SQL Server Management Studio Express 2005. I am aware of the option "Play the Windows default beep when a query batch completes". However, the machine itself (the PC) does not have speakers connected and do not want to attach any speakers.

    Has anyone ever found some code that detects a Windows Message (WM_) or otherwise some kind of a hook that detects when a query is complete in Studio Express?

    [EDIT:]
    The server shares keyboard, monitor and mouse via a KVM box with a half dozen other machines. So even though I may be sitting right next to the server, there's no audio device on the server other than the internal PC speaker.

    [EDIT:]
    The focus of the question is how to detect when any Query has completed when run from Management Studio Express. Once I can detect this, I can write my code to play a sound on the PC internal speaker.

    --
    SQL 2005 Server
    SQL Server Managment Studio Express 2005
    Windows 2003
    VS 2008
    .NET/C#/C++/VB
    Last edited by UpsideDownTire; May 30 '10, 05:11 PM. Reason: Further clarification of the operating environment and emphasis on detection of Query completion.
  • somdutt
    New Member
    • May 2010
    • 3

    #2
    Your machine does not have any Speaker, then what do you want to happen when query completes.. You want a mail or ...what ??

    Comment

    • UpsideDownTire
      New Member
      • Oct 2009
      • 7

      #3
      Hi "somdutt";

      No, there's no speaker other than the internal PC speaker. That's why I am looking to do this.

      The server shares keyboard, monitor and mouse via a KVM box with a half dozen other machines. So even though I may be sitting right next to the server, there's no sound other than the internal PC speaker.

      No, I don't want email. I do email notification from stored procedures that I run on a daily basis.

      As I explained, I am looking to detect when a query (ad hoc query) is complete. From there, I can write the code to play a tone on the PC internal speaker.

      So the focus is on detecting the query complete.

      Comment

      Working...