DTSLogEntryFrequency Enumeration

Provides information to assist in log planning. You pick the hint that most closely corresponds to the frequency that you expect to generate a particular log entry in your task. This enumeration property then assists users of the package when they want to set up filtering of log entries. The user can view the property, and know in advance if there will be an overwhelming number of entries of a particular type, and plan accordingly.

命名空间: Microsoft.SqlServer.Dts.Runtime
程序集: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

语法

声明
Public Enumeration DTSLogEntryFrequency
public enum DTSLogEntryFrequency
public enum class DTSLogEntryFrequency
public enum DTSLogEntryFrequency
public enum DTSLogEntryFrequency

Members

Member name Description
Consistent The entry is logged a consistent number of times, not proportional to the workload. For example, a log that is created at the beginning and in the end of a task.
Occasional The entry is logged sometimes, usually in exceptional cases.
Proportional The entry is logged a number of times proportional to the workload.

示例

The following code example iterates over the LogEntryInfos collection, and then prints the properties of each LogEntryInfo found, including FrequencyHint, which returns a value from this enumeration. The code example does show how to set the FrequencyHint because the property is read-only.

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

namespace LogEntryInfosTest
{
    class Program
    {
        static void Main(string[] args)
        {
            // The package is one of the SSIS Samples.
            string mySample = @"C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx";

            Application app = new Application();
            Package pkg = app.LoadPackage(mySample, null);
            LogEntryInfos logInfos = pkg.LogEntryInfos;

            Console.WriteLine("Number of log entries:  {0}", logInfos.Count.ToString());
            foreach (LogEntryInfo logInfo in logInfos)
            {
                Console.WriteLine("CreationName:   {0}", logInfo.CreationName);
                Console.WriteLine("Description:    {0}", logInfo.Description);
                Console.WriteLine("FrequencyHint:  {0}", logInfo.FrequencyHint);
                Console.WriteLine("ID:             {0}", logInfo.ID);
                Console.WriteLine("Name:           {0}", logInfo.Name);
            }
        }
    }
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
 
Namespace LogEnTryInfosTest
    Class Program
        Shared  Sub Main(ByVal args() As String)
            ' The package is one of the SSIS Samples.
            Dim mySample As String =  "C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx" 
 
            Dim app As Application =  New Application() 
            Dim pkg As Package =  app.LoadPackage(mySample,Nothing) 
            Dim logInfos As LogEnTryInfos =  pkg.LogEnTryInfos 
 
            Console.WriteLine("Number of log entries:  {0}", logInfos.Count.ToString())
            Dim logInfo As LogEnTryInfo
            For Each logInfo In logInfos
                Console.WriteLine("CreationName:   {0}", logInfo.CreationName)
                Console.WriteLine("Description:    {0}", logInfo.Description)
                Console.WriteLine("FrequencyHint:  {0}", logInfo.FrequencyHint)
                Console.WriteLine("ID:             {0}", logInfo.ID)
                Console.WriteLine("Name:           {0}", logInfo.Name)
            Next
        End Sub
    End Class
End Namespace

Sample Output:

Number of log entries: 1

CreationName:

Description: Logs package diagnostics information, e.g. maximum concurrent executables

FrequencyHint: Consistent

ID: {65F44252-EB0C-4CCB-ADE4-BA4AB86B4CF9}

Name: Diagnostic

平台

开发平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

目标平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

请参阅

参考

Microsoft.SqlServer.Dts.Runtime Namespace