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 |
|
phrankbooth
Posting Yak Master
162 Posts |
Posted - 2009-02-04 : 11:08:45
|
| Hi,SQL 2005, latest SP. I run this: exec msdb.dbo.sp_start_job N'MyJob'and get this message: Job 'MyJob' started successfully.Then I wait 10secs and run this:exec msdb.dbo.sp_stop_job N'MyJob'and get this error message:Request to stop job "MyJob" refused because the job is not currently running.All the job does is call stored proc that doesn't do anything fancy and when I run this SP manually there are not errors reported.So, am I missing something here? What should I look at to try to see what's up?Thanks!--PhB |
|
|
revdnrdy
Posting Yak Master
220 Posts |
Posted - 2009-02-04 : 11:16:12
|
quote: Originally posted by phrankbooth Hi,SQL 2005, latest SP. I run this: exec msdb.dbo.sp_start_job N'MyJob'and get this message: Job 'MyJob' started successfully.Then I wait 10secs and run this:exec msdb.dbo.sp_stop_job N'MyJob'and get this error message:Request to stop job "MyJob" refused because the job is not currently running.All the job does is call stored proc that doesn't do anything fancy and when I run this SP manually there are not errors reported.So, am I missing something here? What should I look at to try to see what's up?Thanks!--PhB
Well I think the answer lies in the message. Since the job isn't cuurrently running then there is nothing to stop. Is it possible the job completed before you issue the stop command? Is there anything in the log files (activity log?).r&r |
 |
|
|
phrankbooth
Posting Yak Master
162 Posts |
Posted - 2009-02-04 : 11:45:32
|
| Thanks for your reply.Well, it's a Recurring job that runs every minute, both the Job and the its Schedule are Enabled. The log shows it is running every minute successfully.Or perhaps I'm confusing Running with Enabling? Does Running mean that the steps are being executed or does it mean that the JOB itself is a continuously running process with the steps being children that are invoked per schedule??If it means the former then what I really want to do is Disable the job so that steps are not run.--PhB |
 |
|
|
|
|
|