如何查看完整的SQL作业历史记录? [英] How can I view full SQL Job History?

查看:365
本文介绍了如何查看完整的SQL作业历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SQL Server Management Studio中,当我查看历史记录"以查看SQL作业时,仅显示该作业的最后50次执行.

In SQL Server Management Studio, when I "View History" for a SQL Job, I'm only shown the last 50 executions of the Job.

自从它在服务器上创建以来,如何查看SQL作业的每次执行的完整日志?

How can I view a full log of every execution of a SQL Job since it was created on the server?

推荐答案

SQL Server作业系统限制了每个作业以及整个系统中作业历史记录条目的总数.此信息存储在MSDB数据库中.

The SQL Server Job system limits the total number of job history entries both per job and over the whole system. This information is stored in the MSDB database.

很显然,您将无法返回并查看已丢弃的信息,但是您可以更改 SQL Server代理属性并增加从现在开始将记录的条目数上.

Obviously you won't be able to go back and see information that has been since discarded, but you can change the SQL Server Agent properties and increase the number of entries that will be recorded from now on.

在SQL Server代理属性中:

In the SQL Server Agent Properties:

  • 选择历史记录页面
  • 修改最大作业历史日志大小(行)"和每个作业的最大作业历史行"以适合,或更改基于其年龄删除历史作业数据的方式.

它不会回滚您的历史记录,但会为您将来的查询提供帮助!

It won't give you back your history, but it'll help with your future queries!

这篇关于如何查看完整的SQL作业历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆