Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
HelloRachel
Starting Member
4 Posts |
Posted - 2011-05-12 : 14:34:22
|
Hello All -I am looking for a T-SQL to stop the job after 15 min automatically. Sometimes it happens if i try to stop the job mannually it won't stop and kept running.Thanks much for the help inadvance.Rachel |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2011-05-12 : 16:50:04
|
Have you looked into the sp_stop_job system stored procedure? Details are in BOL. If you can't stop the job manually, however, this might not be of much use.=======================================Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986) |
|
|
HelloRachel
Starting Member
4 Posts |
Posted - 2011-05-13 : 16:49:22
|
Yes I have tried using the code but also as you said I cannot manually stop the job then its of no use. Isn't there any other way or query I can write.ThanksRacel |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
HelloRachel
Starting Member
4 Posts |
Posted - 2011-05-16 : 12:41:00
|
The purpose of the job is refreshing the tab from the server in the excel. When I try to stop it manually it hung up there and shows status "Executing"...and not doing anything for hours. That's the reason I need a T-SQL code or something to stop the job with that like if it ran for more than 10 minutes it will stop automatically.Please help me out with this. I am really looking for a code or something that will help me stop the job.Thanks much in advanceRachel! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
HelloRachel
Starting Member
4 Posts |
Posted - 2011-05-16 : 14:06:30
|
Thank you tara for the quick response. |
|
|
|
|
|