標籤:
在配置Package的logging時,左邊的Containers,Execute SQL Task前麵灰色的“√”表示Execute SQL Task繼承Test Log Package的日誌記錄的配置。Package內的Task,Container的屬性LoggingMode有三種選項:UseParentSetting,Enable和Disable。
UseParentSetting表示繼承Package的設定,Enable表示開機記錄記錄,但是需要單獨配置,Disable表示不記錄組件的日誌。
查看Execute SQL Task的Properties LoggingMode,使用UseParentSetting選項繼承Package的日誌記錄配置。
Parent Logging Options
Frequently, the logging options of tasks and For Loop, Foreach Loop, and Sequence containers match those of the package or a parent container. In that case, you can configure them to inherit their logging options from their parent container. For example, in a For Loop container that includes an Execute SQL task, the Execute SQL task can use the logging options that are set on the For Loop container. To use the parent logging options, you set the LoggingMode property of the container to UseParentSetting. You can set this property in the Properties window of SQL Server Data Tools (SSDT) or through the Configure SSIS Logs dialog box in SSIS Designer.
樣本,將Execute SQL Task的LoggingMode設定為Enable,單獨配置組件記錄的日誌
Step1,Execute SQL Task前面有黑色的“√”,表示Execute SQL Task的LoggingMode設定Enable,開啟右邊的Providers andLogs選項,配置Logging Provider,選擇使用SSIS Log Provoder For SQL Server,將日誌記錄到Sql Server的表中。
Step2,點擊Details,配置需要進行記錄的Event和Event的屬性列。
Step3,執行Package,查看記錄的日誌記錄
SSIS使用Step2中配置的Connection,建立一個System Table,表名是dbo.sysssislog
SSIS 屬性LoggingMode和日誌記錄配置的繼承