3

I am using SQL Server 2016, and have some Jobs running in the SQL Server Agent. Today I found one of the job is taking too long (10hours!) to run and is still processing, so I try to stop that. I tried right-click and stop the job, it showed a success message. However, when I go to the Job Activity Monitor, it is showing that the job is still running! I also tried the following code:

USE [msdb]
GO
EXEC dbo.sp_stop_job N'Process Reserving MI (except problematic tables)' 
GO

It also says the job stopped successfully. But again when I go to the Job Activity Monitor, it is showing that the job is still running!

Can any one please help?

jarlh
  • 42,561
  • 8
  • 45
  • 63
J.Cheuk
  • 93
  • 1
  • 2
  • 8
  • Do you refresh the activity monitor after `sp_stop_job`? – GSerg Apr 26 '19 at 08:57
  • Yes I refreshed the activity monitor each time I tried stopping it, but it is still showing the job is running. – J.Cheuk Apr 26 '19 at 08:59
  • Possible duplicate of [sp_stop_job reports Success, but the jobs are still running](https://dba.stackexchange.com/q/141712/5203) – GSerg Apr 26 '19 at 08:59
  • Looking through the link, so there is no way to know whether the job is actually stopped or not? – J.Cheuk Apr 26 '19 at 09:14
  • Look at the active transactions list. Is there something rolling back? – GSerg Apr 26 '19 at 09:15
  • I tried looking at the open transaction list by: `DBCC OPENTRAN` and it shows "No active open transactions. DBCC execution completed. If DBCC printed error messages, contact your system administrator." – J.Cheuk Apr 26 '19 at 09:29

1 Answers1

1

At the end I have to ask the server team to reboot the server in order to solve this problem

J.Cheuk
  • 93
  • 1
  • 2
  • 8