sys.sp_purge_jobhistory
general #stored-procedure
Description
Removes the history records for a job in the SQL Server Agent service.
Syntax
sp_purge_jobhistory
[ [ @job_name = ]
N
'job_name'
]
[ , [ @job_id = ]
'job_id'
]
[ , [ @oldest_date = ] oldest_date ]
[ ; ]
Examples
Example 1
NULL
Example 2
sp_purge_jobhistory
Example 3
0
Example 4
1
Example 5
sp_purge_jobhistory
Example 6
sp_purge_jobhistory
Example 7
sp_purge_jobhistory
Example 8
msdb