码迷,mamicode.com
首页 > 其他好文 > 详细

SSIS 提供的日志记录

时间:2015-09-16 15:35:24      阅读:727      评论:0      收藏:0      [点我收藏+]

标签:

SSIS提供的日志记录功能,Sql Server 2012有三种配置方式:在Package上进行配置,在Package发布的Server上配置,在Job Agent上New step时配置logging。

 

一,在Package上配置日志,记录的是SSIS的Event Log

选择将log存在的Sql server中,SSIS会自动创建一个log表dbo.sysssislog。也可以通过SSIS菜单中的Log Events子菜单,查看package 执行时的Event日志记录。

1,点击SSIS菜单的Logging

技术分享

 

2,选择Provider Type,分别存储在不同的介质中,需要记录是Container,Package或Task在run time产生的Event Log,所以必须在左侧Containers中选择Event Host。技术分享

Integration Services includes the following log providers:

  • The Text File log provider, which writes log entries to ASCII text files in a comma-separated value (CSV) format. The default file name extension for this provider is .log.

  • The SQL Server Profiler log provider, which writes traces that you can view using SQL Server Profiler. The default file name extension for this provider is .trc. Note You cannot use the SQL Server Profiler log provider in a package that is running in 64-bit mode.

  • The SQL Server log provider, which writes log entries to the sysssislog table in a SQL Server database.

  • The Windows Event log provider, which writes entries to the Application log in the Windows Event log on the local computer.

  • The XML File log provider, which writes log files to an XML file. The default file name extension for this provider is .xml.

 

技术分享

SSIS自动使用链接创建一个System Tables:dbo.sysssislog,用以存储日志。

Contains one row for each logging entry that is generated by packages or their tasks and containers at run time. This table is created in the msdb database when you install Microsoft SQL Server Integration Services. If you configure logging to log to a different SQL Server database, a sysssislog table with this format is created in the specified database.

技术分享

3,选择记录的Events,点击Advanced按钮进行更详细的配置

技术分享

 

技术分享

 

 下表中的三个字段没有显示在Detail中,但是会记录到日志中。

Element

Description

StartTime

The time at which the container or task starts to run.

EndTime

The time at which the container or task stops running.

This feature is not implemented. The value in the endtime column is always the same as the value in the starttime column.

DataCode

An optional integer value that typically contains a value from the DTSExecResult enumeration that indicates the result of running the container or task:

  • 0 - Success

  • 1 - Failure

  • 2 - Completed

  • 3 - Canceled

 

 

二,在执行package的Server上进行配置日志记录

1,打开IS Catalogs,选中需要进行日志配置的Package,点击Execute菜单

技术分享

技术分享

2,打开Advanced选项卡,通过修改Logging Level,可以更新package记录日志的level

技术分享

To set or change the logging level for a package when you run a package that you have deployed to the Integration Services server. The logging level you set when you run the package overrides the package logging you configure using SQL Server Data Tools (SSDT).

Logging Level

Description

None

Logging is turned off. Only the package execution status is logged.

Basic

All events are logged, except custom and diagnostic events. This is the default value.

Performance

Only performance statistics, and OnError and OnWarning events, are logged.

The Execution Performance report displays Active Time and Total Time for package data flow components. This information is available when the logging level of the last package execution was set to Performance or Verbose. For more information, see Reports for the Integration Services Server.

The catalog.execution_component_phases view displays the start and end times for the data flow components, for each phase of an execution. This view displays this information for these components only when the logging level of the package execution is set to Performance or Verbose.

Verbose

All events are logged, including custom and diagnostic events.

An example of a diagnostic event, is the DiagnosticEx event. Whenever an Execute Package task executes a child package, it logs this event. The event message consists of the parameter values passed to child packages

The value of the message column for DiagnosticEx is XML text. . To view the message text for a package execution, query the catalog.operation_messages (SSISDB Database) view.

技术分享                           Note                        

Custom events include those events that are logged by Integration Services tasks. For more information, see Custom Messages for Logging.

The catalog.execution_data_statistics view displays a row each time a data flow component sends data to a downstream component, for a package execution. The logging level must be set to Verbose to capture this information in the view.

 

三,在Job Agent上New step时配置logging

技术分享

 

SSIS 提供的日志记录

标签:

原文地址:http://www.cnblogs.com/ljhdo/p/4811762.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!