Home Forums SQL Server 2012 SQL Server 2012 - T-SQL one of my stored proc is getting stuck in activity monitor for 2 hours. RE: one of my stored proc is getting stuck in activity monitor for 2 hours.

  • I think Jeff's got the right idea in adding OPTION (RECOMPILE) as a short-term fix. In fixing the problem, you should look for what's calling it, as well as finding out why it's taking so long. If it's just a SELECT statement and isn't writing the data anywhere, then you have to ask yourself if there's a person running it.