Link to home
Start Free TrialLog in
Avatar of QPR
QPRFlag for New Zealand

asked on

what fires sp_recompile

A user was doing some processing yesterday evening and it failed after 20 minutes.
The log said that the object had changed since the process started.
I knew this process fell outside of my maintenance window that recompiles/updates stats etc so I investigated.
I found that just before the process failed SQL ran sp_recompile.
I can't see any SQL maintenance tasks that run any time near the user was working so was wondering what would have spawned this?
It was run from the mssqlsystemresource DB. At this time I see deadlocks for the users process.
I have never struck this issue before.
Avatar of arnold
arnold
Flag of United States of America image

Here is the description for the sp.
https://msdn.microsoft.com/en-us/library/ms181647(v=sql.105).aspx

Your best bet is to check the history log for which jobs ran during the time frame in question.
Then see whether they have this procedure called,

It might be part of a statistics update, though you said that was not run.

See note SQL may have determined it would be advantageous to recompile this sp.
ASKER CERTIFIED SOLUTION
Avatar of QPR
QPR
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
QPR, do you still need help with this question?
Avatar of QPR

ASKER

I found the app which was calling the sp