July 27, 2005 at 8:27 am
Hi All,
I have a question. I am running time taking queries in the query analyzer. I was wondering if there was a way like displaying a pop-up window or some thing like that that notifies me that the query is finished. In that way I don't need to go back to query analyzer until the query is finished.
Thanks,
Sridhar!!
July 27, 2005 at 8:33 am
Sridhar,
Nothing with Query Analyzer i believe!
Maybe, u can put this query in a job and notify u by a netsend operator/mail operator. 2nd option wud be to write a small vbscript program and put it in scheduled task but better wud b first option..
Good luck...:-)
Dilip
July 27, 2005 at 8:40 am
Hi Dilip,
Thank you very much for the reply. I am not a DBA. So I am not sure whether I can put this in a job and get notified. If this is the solution which does not require any special permissions then could you please explain in detail how I should do that. If I need special permissions for that then will it be possible for you to let me know how to use the second option?
Thanks,
Sridhar
July 27, 2005 at 8:51 am
You can configure a .wav file to play when a query is completed. If you make it a unique sound, you'll hear it sound when the query completes.
K. Brian Kelley
@kbriankelley
July 27, 2005 at 9:20 am
BKELLEY is spot on. Go to tools-->options-->results
You can choose the box "when query batch completes" and either select "play windows beep" or "play this WAV file"
July 27, 2005 at 10:11 am
Thank you all. The problem is I don't have speakers to my computer in work. so I was trying to find a solution that would display like a pop-up window or some thing that i can notice even if i browsing the internet while running the query.
Thanks,
Sridhar!!
July 27, 2005 at 10:30 am
You could put XP_SENDMAIL after your query and send yourself an email ...
July 27, 2005 at 4:33 pm
As I said before I don't have DBA permissions to the database. So I cannot execute xp_sendmail.
July 27, 2005 at 11:24 pm
1.You can create a job setp and paste ur T-SQL in the step and the notifications you can define either a net-send operator or mail operator. But i'm afraid that you will have to ask your dba to give ur login appropriate permission to execute the job.
2. If u r a developer, since u have select rights, as i said u can easily create a small program in vbscript/vba/.net or any of ur favorite tools to connect to ur database and execute the query and at the end display a MessageBox. Good luck buddy 🙂
Bkelley, I learnt a new thing from u..Thanks.
Dilip
July 27, 2005 at 11:30 pm
Create a new DTS package. Then add a connection to the local machine. Add a SQL Task and paste the query in the text box. Next, add a ActiveX Script and paste the following code:
Function Main()
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "net send <your_computer_name> Query has completed."
Main = DTSTaskExecResult_Success
End Function
Finally, Connect both tasks with a Completion workflow connector. That's it. Run the package, or schedule the package and you will be told when its done.
July 29, 2005 at 1:25 pm
You could try creating a batch file on the machine that the query will be running on that will send a net send to your machine. you can then execute this at the end of the query by using the xp_cmdshell procedure to execute the batch file.
Conor. MCP
July 29, 2005 at 2:22 pm
Best solution will probably be to buy the speakers!!
* Noel
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply