다음을 통해 공유


DTSEventColumnFilter.SourceID 필드

정의

이벤트를 발생시킨 태스크의 GUID가 로그 항목에 추가되는지 여부를 결정합니다.

public: bool SourceID;
public bool SourceID;
val mutable SourceID : bool
Public SourceID As Boolean 

필드 값

예제

다음 코드 예제에서는 로그 공급자를 Package 만들고 선택합니다. 그런 다음 코드 예제에서는 해당 필드를 DTSEventColumnFiltertrue 로그에 포함하거나 false 로그에서 필드를 제외할 필드를 설정합니다. 그런 SetColumnFilter 다음, 패키지에 이벤트가 발생할 때 값 true 이 있는 필드가 기록되도록 정의합니다 OnError .

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace HttpClientConn  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Package pkg = new Package();  
            LogProvider log1 = pkg.LogProviders.Add("DTS.LogProviderTextFile.1");  
            pkg.LoggingOptions.SelectedLogProviders.Add(log1);  
            LoggingOptions lOpts = pkg.LoggingOptions;  

            DTSEventColumnFilter ecf = new DTSEventColumnFilter();  
            // Set the detailed information to log when the event occurs.  
            // This specifies to log the Computer, Operator, and SourceName only.  
            ecf.Computer = true;  
            ecf.Operator = true;  
            ecf.SourceName = true;  
            ecf.SourceID = false;  
            ecf.ExecutionID = false;  
            ecf.MessageText = false;  
            ecf.DataBytes = false;  
            // The event is the first parameter, and the columns to log is the enumeration.   
            lOpts.SetColumnFilter("OnError", ecf);  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace HttpClientConn  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim pkg As Package =  New Package()   
            Dim log1 As LogProvider =  pkg.LogProviders.Add("DTS.LogProviderTextFile.1")   
            pkg.LoggingOptions.SelectedLogProviders.Add(log1)  
            Dim lOpts As LoggingOptions =  pkg.LoggingOptions   

            Dim ecf As DTSEventColumnFilter =  New DTSEventColumnFilter()   
            ' Set the detailed information to log when the event occurs.  
            ' This specifies to log the Computer, Operator, and SourceName only.  
            ecf.Computer = True  
            ecf.Operator = True  
            ecf.SourceName = True  
            ecf.SourceID = False  
            ecf.ExecutionID = False  
            ecf.MessageText = False  
            ecf.DataBytes = False  
            ' The event is the first parameter, and the columns to log is the enumeration.   
            lOpts.SetColumnFilter("OnError", ecf)  
        End Sub  
    End Class  
End Namespace  

설명

true 는 로그 항목에 이 열을 추가합니다.

적용 대상