Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Log History

Author  Topic 

pdset
Constraint Violating Yak Guru

310 Posts

Posted - 2012-10-30 : 17:14:52
For some reason the LOG HISTROY for some of the SQL Agent Jobs were automatically removed and leaves no evidence of its history and knows not who has deleted.

Why in the first place the Log History should be deleted?

I know I can still query the results of execution and get the timings for each execution.

By querying will get the results but if a job contains number of 'steps' then each step execution timings is procured through Log History, but not through my query which I have borrowed (Query needs some more attention by me .. working on..)

Can anyone specify as who can delete these log history and how to find?

what is the best way that we can raise the job history to hold in the log history?



I know SQL Agent -->History --> can set the parameters --> Maximum Job history log size (in Rows) SET as 1000;
Maximum job history rows per job SET as 100 (Default Setttings)

I have even checked 'msdb.dbo.sp_syspolicy_purge_history' SP, which is not working but under SQL Server 2008 R2 Version there is a default SQL Agent Job 'SYSPOLICY_PURGE_HISTORY' holds one of the steps called 'Purge history' which uses the MSDB's SP, but that will have an effect of deleting only the JOBS that were requested to delete the HISTORY of System Oriented, but not the others.

Then my Setting for the history is perfectly works as all other remaining jobs were NOT deleted.

Can anyone help me in deducing as to how to maintain the history to be retained on the log history and also not to get deleted and how to keep track of it.

pdset
Constraint Violating Yak Guru

310 Posts

Posted - 2012-10-31 : 16:54:53
Can anyone help in solution for Log history deletion as who and when either in Stored Procedure or Query.
Go to Top of Page
   

- Advertisement -