SQLServer job日志丢失


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

查看job日志,发现只有当天的部分,其它的没有了。
原因是默认job日志记录是1000条,修改下即可。
SQLServer代理-属性-历史记录中调整,或者使用如下sql

USE [msdb]
GO
EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=10000
GO