Fanr

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
Make sure each maintenance job has an output file in a standard
directory.
In the advanced tab under the job steps create an output file. This will
allow you to see the full description of the job execution. There is
nothing more annoying than not being able to see why a job failed.

如何设置作业输出文档:

  1. In Object Explorer, connect to an instance of the Microsoft SQL Server Database Engine, and then expand that instance.

  2. Expand SQL Server Agent, expand Jobs, right-click the job that contains the job step to be viewed, and click Properties.

  3. In the Job Properties dialog, click the Steps page.

  4. Click the job step to be viewed, and click Edit.

  5. On the General page of the Job Step Properties dialog, you can view the type of job step and what it does.

  6. Click the Advanced page to view the actions SQL Server Agent takes if the job step succeeds or fails, how many times the job step should be attempted, where the job step output is written, and the user the job step runs as.

 查看输出文档

To view job step output

  1. In the Job Step Properties dialog, click the Advanced page.

  2. Depending on the version of SQL Server you are connected to, you can view either the job step output file or table as follows:

    • When you are connected to Microsoft SQL Server 2000, you can click View to view the output file in Notepad. Job steps cannot be logged to a table in SQL Server 2000.

    • When you are connected to Microsoft SQL Server 2005 or later, you can click View only when Log to table is checked. In this case, the job step output is written to the sysjobstepslogs table in the msdb database.

      In SQL Server 2005 or later, the View button is disabled when job step output is written to a file. To view a job step output file, use Notepad.

posted on 2011-03-30 11:10  Fanr_Zh  阅读(190)  评论(0编辑  收藏  举报