Integration Services 包记录的事件Events Logged by an Integration Services Package

适用对象:是SQL Server 是Azure 数据工厂中的 SSIS Integration Runtime APPLIES TO: yesSQL Server yesSSIS Integration Runtime in Azure Data Factory

Integration ServicesIntegration Services 包将各种事件消息记入 Windows 应用程序事件日志。An Integration ServicesIntegration Services package logs various event messages to the Windows Application event log. 包会在包启动时、包停止时和特定问题出现时记录这些消息。A package logs these messages when the package starts, when the package stops, and when certain problems occur.

本主题提供有关包记入应用程序事件日志的常见事件消息的信息。This topic provides information about the common event messages that a package logs to the Application event log. 默认情况下,即使未对包启用日志记录,包也会记录其中某些消息。By default, a package logs some of these messages even if you have not enabled logging on the package. 但对于其他消息,只有对包启用了日志记录,包才会记录这些消息。However, there are other messages that the package will log only if you have enabled logging on the package. 无论包是在默认情况下还是在启用日志记录后记录这些消息,消息的事件源都是 SQLISPackage。Regardless of whether the package logs these messages by default or because logging has been enabled, the Event Source for the messages is SQLISPackage.

有关如何运行 SSIS 包的常规信息,请参阅项目和包的执行For general information about how to run SSIS packages, see Execution of Projects and Packages.

有关如何对运行的包进行故障排除的信息,请参阅 对包执行进行故障排除的工具For information about how to troubleshoot running packages, see Troubleshooting Tools for Package Execution.

有关包状态的消息Messages about the Status of the Package

运行 Integration ServicesIntegration Services 包时,包会通常会记录有关包的进度和状态的各种消息。When you run an Integration ServicesIntegration Services package, the package typically logs various messages about the progress and status of the package. 下表列出了这些消息。The following table lists those messages.

备注

即使未对包启用日志记录,包也会记录下表中的消息。The package will log the messages in the following table even if you have not enabled logging for the package.

事件 IDEvent ID 符号名称Symbolic Name 文本Text 说明Notes
1228812288 DTS_MSG_PACKAGESTARTDTS_MSG_PACKAGESTART 包“”已开始运行。Package "" started. 包已开始运行。The package has started to run.
1228912289 DTS_MSG_PACKAGESUCCESSDTS_MSG_PACKAGESUCCESS 包“”已成功完成。Package "" finished successfully. 包已运行成功且不再运行。The package successfully ran and is no longer running.
1229012290 DTS_MSG_PACKAGECANCELDTS_MSG_PACKAGECANCEL 包“%1!s!”Package "%1!s!" 已取消。has been cancelled. 包已取消,因此不再运行。The package is no longer running because the package was canceled.
1229112291 DTS_MSG_PACKAGEFAILUREDTS_MSG_PACKAGEFAILURE 包“”已失败。Package "" failed. 包无法成功运行,已停止运行。The package could not run successfully and stopped running.

默认情况下,在全新安装中, Integration ServicesIntegration Services 配置为不将有关包运行的某些事件记录到应用程序事件日志中。By default, in a new installation, Integration ServicesIntegration Services is configured not to log certain events that are related to the running of packages to the Application event log. 使用当前版本的 SQL ServerSQL ServerIntegration ServicesIntegration Services的数据收集器功能时,此设置可防止生成过多的事件日志项。This setting prevents too many event log entries when you use the Data Collector feature of the current release of SQL ServerSQL ServerIntegration ServicesIntegration Services. 未记录的事件是,EventID 12288“包已启动”和 EventID 12289“包已成功完成”。The events that are not logged are EventID 12288, "Package started," and EventID 12289, "Package finished successfully." 若要将这些事件记录到应用程序事件日志中,请打开注册表以进行编辑。To log these events to the Application event log, open the registry for editing. 然后在注册表中,找到 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\130\SSIS 节点,并将 LogPackageExecutionToEventLog 设置的 DWORD 值从 1 更改为 0。Then in the registry, locate the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\110\SSIS node, and change the DWORD value of the LogPackageExecutionToEventLog setting from 0 to 1. 不过,在升级安装中, Integration ServicesIntegration Services 配置为记录这两个事件。However, in an upgrade insallation, Integration ServicesIntegration Services is configured to log these two events. 若要禁用记录功能,请将 LogPackageExecutionToEventLog 设置的值从 1 更改为 0。To disable logging, change the value of the LogPackageExecutionToEventLog setting from 1 to 0.

与包日志记录关联的消息Messages Associated with Package Logging

如果已对包启用日志记录,应用程序事件日志将是 Integration ServicesIntegration Services 包中可选的日志记录功能所支持的目标之一。If you have enabled logging on the package, the Application event log is one of the destinations that is supported by the optional logging features in Integration ServicesIntegration Services packages. 有关详细信息,请参阅 Integration Services (SSIS) 日志记录For more information, see Integration Services (SSIS) Logging.

如果已对包启用日志记录而且日志位置为应用程序事件日志,则包将记录与以下信息相关的项:When you have enabled logging on the package and the log location is the Application event log, the package logs entries that pertain to the following information:

  • 有关包运行时所处的阶段的消息。Messages about which stage the package is in while the package runs.

  • 有关包运行时发生的特定事件的消息。Messages about particular events that occur while the package runs.

有关包执行阶段的消息Messages about the Stages of Package Execution

事件 IDEvent ID 符号名称Symbolic Name 文本Text 说明Notes
1254412544 DTS_MSG_EVENTLOGENTRYDTS_MSG_EVENTLOGENTRY 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 将包日志记录配置为记入应用程序事件日志时,各种消息都会使用这种通用格式。When you configure package logging to the Application event log, various messages use this generic format.
1255612556 DTS_MSG_EVENTLOGENTRY_PACKAGESTARTDTS_MSG_EVENTLOGENTRY_PACKAGESTART 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 包已启动。The package started.
1254712547 DTS_MSG_EVENTLOGENTRY_PREVALIDATEDTS_MSG_EVENTLOGENTRY_PREVALIDATE 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 对象验证即将开始。Validation of the object is about to begin.
1254812548 DTS_MSG_EVENTLOGENTRY_POSTVALIDATEDTS_MSG_EVENTLOGENTRY_POSTVALIDATE 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 对象验证已完成。Validation of the object has finished.
1255212552 DTS_MSG_EVENTLOGENTRY_PROGRESSDTS_MSG_EVENTLOGENTRY_PROGRESS 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 此通用消息用于报告包的进度。This generic message reports package progress.
1254612546 DTS_MSG_EVENTLOGENTRY_POSTEXECUTEDTS_MSG_EVENTLOGENTRY_POSTEXECUTE 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 对象已完成其工作。The object has finished its work.
1255712557 DTS_MSG_EVENTLOGENTRY_PACKAGEENDDTS_MSG_EVENTLOGENTRY_PACKAGEEND 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 包已经完成运行。The package has finished running.

有关发生的事件的消息Messages about Events that Occur

下表仅列出属于事件结果的部分消息。The following table lists only some of the messages that are the result of events. 有关 Integration ServicesIntegration Services 使用的错误、警告和信息性消息的更全面的列表,请参阅 Integration Services 错误和消息引用For a more comprehensive list of error, warning, and informational messages that Integration ServicesIntegration Services uses, see Integration Services Error and Message Reference.

事件 IDEvent ID 符号名称Symbolic Name 文本Text 说明Notes
1225112251 DTS_MSG_EVENTLOGENTRY_TASKFAILEDDTS_MSG_EVENTLOGENTRY_TASKFAILED 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 任务失败。The task failed.
1225012250 DTS_MSG_EVENTLOGENTRY_ERRORDTS_MSG_EVENTLOGENTRY_ERROR 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 此消息用于报告产生了一个错误。This message reports an error that has occurred.
1224912249 DTS_MSG_EVENTLOGENTRY_WARNINGDTS_MSG_EVENTLOGENTRY_WARNING 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 此消息用于报告产生了一个警告。This message reports a warning that has occurred.
1225812258 DTS_MSG_EVENTLOGENTRY_INFORMATIONDTS_MSG_EVENTLOGENTRY_INFORMATION 事件名称: %1%r 消息: %9%r 操作员: %2%r 源名称: %3%r 源 ID: %4%r 执行 ID: %5%r 开始时间: %6%r 结束时间: %7%r 数据代码: %8Event Name: %1%r Message: %9%r Operator: %2%r Source Name: %3%r Source ID: %4%r Execution ID: %5%r Start Time: %6%r End Time: %7%r Data Code: %8 此消息用于报告与错误或警告无关的信息。This message reports informational that is not associated with an error or a warning.

在“日志事件”窗口中查看日志项View Log Entries in the Log Events Window

此过程描述如何运行包并查看它写入的日志项。This procedure describes how to run a package and view the log entries it writes. 您可以实时查看日志项。You can view the log entries in real time. 此外,还可以将写入 “日志事件” 窗口的日志项复制并保存,以便进行进一步分析。The log entries that are written to the Log Events window can also be copied and saved for further analysis.

不需要将日志项写入日志即可将这些项写入 “日志事件” 窗口。It is not necessary to write the log entries to a log to write the entries to the Log Events window.

查看日志项To view log entries

  1. SQL Server Data ToolsSQL Server Data Tools中,打开包含所需包的 Integration ServicesIntegration Services 项目。In SQL Server Data ToolsSQL Server Data Tools, open the Integration ServicesIntegration Services project that contains the package you want.

  2. SSIS 菜单上单击 “日志事件”On the SSIS menu, click Log Events. 通过将 View.LogEvents 命令映射为在 “选项” 对话框的 “键盘” 页中所选的组合键,您可以选择显示 “日志事件” 窗口。You can optionally display the Log Events window by mapping the View.LogEvents command to a key combination of your choosing on the Keyboard page of the Options dialog box.

  3. “调试” 菜单中,单击 “启动调试”On the Debug menu, click Start Debugging.

    当运行时遇到为日志记录启用的事件和自定义消息时,每个事件或消息的日志项将写入 “日志事件” 窗口。As the runtime encounters the events and custom messages that are enabled for logging, log entries for each event or message are written to the Log Events window.

  4. “调试” 菜单中,单击 “停止调试”On the Debug menu, click Stop Debugging.

    日志项在 “日志事件” 窗口中保留可用状态,直到重新运行包、运行其他包或关闭 SQL Server Data ToolsSQL Server Data ToolsThe log entries remain available in the Log Events window until you rerun the package, run a different package, or close SQL Server Data ToolsSQL Server Data Tools.

  5. “日志事件” 窗口中查看日志项。View the log entries in the Log Events window.

  6. (可选)单击要复制的日志项,右键单击,然后单击“复制” 。Optionally, click the log entries to copy, right-click, and then click Copy.

  7. (可选)双击日志项,然后在“日志条目”对话框中,查看单个日志项的详细信息。 Optionally, double-click a log entry, and in the Log Entry dialog box, view the details for a single log entry.

  8. “日志条目” 对话框中,单击向上和向下键头,以显示上一个或下一个日志项,并单击复制图标以复制该日志项。In the Log Entry dialog box, click the up and down arrows to display the previous or next log entry, and click the copy icon to copy the log entry.

  9. 打开文本编辑器,粘贴,然后将日志项保存到文本文件中。Open a text editor, paste, and then save the log entry to a text file.