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?
2条答案
按热度按时间v6ylcynt1#
At the end I have to ask the server team to reboot the server in order to solve this problem
68de4m5k2#
I had a similar issue where a reoccuring maintenance task (15 minute intervals) was running, would not stop, and could not be run again because it was apparently already running.
My solution was to restart the SQL Server Agent service for that SQL instance. The below is a quick guide on how I did it in my environment (Windows Server 2022 running SQL Server Standard 2016)
This way you're not potentially reboot a production server. Your solution of rebooting the server though did help me formulate this solution. This forced the unstoppable job to stop, and I was able to execute it manually, and it successfully followed the schedule moving forward.