December 29, 2011 at 2:17 am
Hello,
I would like to change my job history log setting from "limit size" to "remove agent history older than".
I don't find sp or other to do that in tsql (i don't want to do that with EM)
Could you help me
Thanks
Nicolas
December 29, 2011 at 6:24 am
I am not sure at the moment (& also can’t verify it on EM/SSMS) but EM usually allows you to script your actions. Try it with EM & save the script for future reference.
December 29, 2011 at 7:27 am
Hello,
Thanks for your answer. I had not thought this.
The solution is :
EXEC msdb.dbo.sp_purge_jobhistory @oldest_date=GETDATE()-14
EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=-1,
@jobhistory_max_rows_per_job=-1
Thanks
Nicolas
December 29, 2011 at 7:55 am
ndessaint (12/29/2011)
Hello,Thanks for your answer. I had not thought this.
The solution is :
EXEC msdb.dbo.sp_purge_jobhistory @oldest_date=GETDATE()-14
EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=-1,
@jobhistory_max_rows_per_job=-1
Thanks
Nicolas
As I have already said, I was not sure. It’s your good luck buddy 🙂 so credit goes to you only.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply