i have noticed that the job history of several of my jobs
has been disappearing...is there a setting I need to
change or a bug fix I need to apply to correct this?Hi Jamie,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From you information, your problem is when you check to see the job
history in the Enterprise managere and want to see the history of some
specific job, you find that some of the job history is disappear, right?
First of all, I want to make it clear that there is never been a history of
some specific job at all or some of the history is missing,
If what you mean is that you cannot find the job history of one period of
time, I can make some explanation and give you some solutions:
In SQL Server, all the job history will be saved in a table named
'sysjobhistory' in database 'msdb'. When a job is logged in the
sysjobhistory table, you should see an entry made for each job step (which
will be denoted by the step_id) and also the job outcome (which will be
denoted with a step_id equal to 0 and a step name equal to Job outcome).
In the default configuration of the SQL Server Agent (In your Enterprise
Manager, open 'Management' folder, right click 'SQL Server Agent', choose
'Properties', then in 'Job System' page, in the 'Job History Log', you will
find 'Maximum job log size', 'Maximum Job History rows per job' and Current
job history log size(rows)' settings. By default, the 'Maximum job log
size' is set to 1000, that means there are only 1000 entries in table
'sysjobhistory'. The 'Maximum job history rows per job' means how many
entries will be kept for each job, the default setting is 100. For example,
if there is a one step job, there will be at most iterations of the job (1
line for the job step and 1 line to record the job outcome). If the total
job number is large or if the job runs frequently, the early job history
will be replaced by the new history.
To ensure that you were maintaining the job history for longer periods of
time, you can increase the following settings:
"Maximum job history log size (rows)"
"Maximum job history rows per job"
There are also some other ways to get all the job history, if this is what
you want, please post new message here and I will give you the thinking of
how to do that.
If there is never been a job history for some specific job, please ensure
that the job is running and is scheduled, or it will never have an entry in
the 'sysjobhistory' table.
If you still have questions, please feel free to post new message here and
I am ready to help!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.
No comments:
Post a Comment