DTSCheckpointUsage 枚举
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定说明是否重新启动包或重新启动的时间的值。
public enum class DTSCheckpointUsage
public enum DTSCheckpointUsage
type DTSCheckpointUsage =
Public Enum DTSCheckpointUsage
- 继承
-
DTSCheckpointUsage
字段
Always | 2 | 指定始终重新启动包。 |
IfExists | 1 | 指定如果找到由 CheckpointFileName 指定的文件则重新启动包。 |
Never | 0 | 指定从不重新启动包。 这是默认值。 |
示例
下面的代码示例设置属性 CheckpointUsage 。
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
namespace Package_API
{
class Program
{
static void Main(string[] args)
{
Application app = new Application();
Package pkg = new Package();
pkg = app.LoadPackage(@"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx", null);
// Set the CheckpointUsage to IfExists to force package to restart if
// the file specified by the CheckpointFileName property is found.
pkg.CheckpointUsage = DTSCheckpointUsage.IfExists;
Console.WriteLine("Check for existing checkpoint file? {0}", pkg.CheckpointUsage);
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Namespace Package_API
Class Program
Shared Sub Main(ByVal args() As String)
Dim app As Application = New Application()
Dim pkg As Package = New Package()
pkg = app.LoadPackage("C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx", Nothing)
' Set the CheckpointUsage to IfExists to force package to restart if
' the file specified by the CheckpointFileName property is found.
pkg.CheckpointUsage = DTSCheckpointUsage.IfExists
Console.WriteLine("Check for existing checkpoint file? {0}", pkg.CheckpointUsage)
End Sub
End Class
End Namespace
示例输出:
检查是否存在现有检查点文件? IfExists