job history in SSMS is short..

is the longer history stored in a DMV?
Is there a setting to show/store more in the GUI SSMS also, for each job. ?
LVL 5
25112Asked:
Who is Participating?
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
It's the default value from Microsoft. They maybe think that should be reasonable but at least they let us change their defaults :)
0
 
Steve WalesSenior Database AdministratorCommented:
There is a job history cleanup task in Maintenance Plans:

https://msdn.microsoft.com/en-us/library/ms186524.aspx

If this cleanup task is running on your server and set to X number of days, then you'll only find job history kept for X number of days, then it's purged.

If you want longer history kept, find out who controls the cleanup task and ask them to set retention for a longer period.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Can you reformulate the question? I can't understand it.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
25112Author Commented:
Steve, I don't see any under SSMS->Management->Maintenance Plans

Is there a way to confirm if this is running?

Vitor,

Under SSMS, under SQL Server Agent, and under Jobs, right click on a job and click 'history'.. sometimes you see only few history records, sometimes more.. I would like to know
1)the settings how to control this? How many gets displayed etc
2)The ones that are not displayed- are they stored/saved in any system view for historical analysis?
0
 
Steve WalesSenior Database AdministratorCommented:
The maintenance plan is just one way of doing it.  There's a stored procedure that the maintenance wizard runs (sp_purge_jobhistory): https://msdn.microsoft.com/en-us/library/ms175044.aspx

Is it possible that there's a job running that called this stored procedure?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
I understand now :)
You can configure the size of the history. Just go to SQL Server Agent and right-click on Properties then History and then you can set the new value:
SQLAgentProperty-History.PNG
0
 
25112Author Commented:
thank you. Is there a reason why 15000 was chosen. was it a random number or a logic behind it?
0
 
25112Author Commented:
OK. good.
0
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.

All Courses

From novice to tech pro — start learning today.