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.
LVL 29
QPRAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
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.
0
QPRAuthor Commented:
Thanks.
I found the culprit.
I remembered that the application itself has a nightly "maintenance" task that runs at exactly at the same time as the user experienced the error.
No SQL jobs but instead the app calling out to sql to run this SP at periodic intervals.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vitor MontalvãoMSSQL Senior EngineerCommented:
QPR, do you still need help with this question?
0
QPRAuthor Commented:
I found the app which was calling the sp
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.