Removes the history records for a job.
Example
Purge job history records older than 30 days.
DECLARE @PurgeDate DATE
SET @PurgeDate = (SELECT CONVERT(DATE, (GETDATE()-30), 101) )
EXEC sp_purge_jobhistory @oldest_date = @PurgeDate
Removes the history records for a job.
Purge job history records older than 30 days.
DECLARE @PurgeDate DATE
SET @PurgeDate = (SELECT CONVERT(DATE, (GETDATE()-30), 101) )
EXEC sp_purge_jobhistory @oldest_date = @PurgeDate
Comments