在属性表达式中使用枚举常量

新建日期: 2005 年 12 月 5 日

如果属性表达式包括枚举器成员列表中的值,则该表达式必须使用枚举器成员的数值,而不是成员的友好名称。 例如,如果表达式设置 LoggingMode 属性,则必须使用数值 2 而不是友好名称“Disabled”。

此主题只列出通常会在属性表达式中使用其成员的枚举器的友好名称的等价数值。 Integration Services 对象模型包括很多其他枚举器,在编写对象模型以便以编程方式生成包时,或为诸如任务和数据流组件等自定义包元素编写代码时,需要使用这些枚举器。 有关详细信息,请参阅 Integration Services Programming 中的 Integration Services 类库部分。

除了包和包对象的自定义属性以外,Business Intelligence Development Studio 中的“属性”窗口还包括一组对于包、任务和 Foreach 循环、For 循环和序列容器可用的属性。 由枚举器中的值所设置的通用属性(ForceExecutionResultLoggingModeIsolationLevelTransaction Option)将在“通用属性”部分中列出。

以下部分提供了有关枚举常量的信息:

Foreach 循环枚举器

任务

维护计划任务

通用属性

下表列出了通过使用枚举器中的值所设置的包的属性的友好名称和等价数值。

PackageType 属性 — 通过使用 DTSPackageType 枚举中的值设置。

DTSPackageType 中的友好名称 数值

Default

0

DTSWizard

1

DTSDesigner

2

SQLReplication

3

DTSDesigner90

5

SQLDBMaint

6

CheckpointUsage 属性 - 通过使用 DTSCheckpointUsage 枚举中的值设置。

DTSCheckpointUsage 中的友好名称 数值

Never

0

IfExists

1

Always

2

PackagePriorityClass 属性 - 通过使用 DTSPriorityClass 枚举中的值设置。

DTSPriorityClass 中的友好名称 数值

Default

0

AboveNormal

1

Normal

2

BelowNormal

3

Idle

4

ProtectionLevel 属性 - 通过使用 DTSProtectionLevel 枚举中的值设置。

DTSProtectionLevel 中的友好名称 数值

DontSaveSensitive

0

EncryptSensitiveWithUserKey

1

EncryptSensitiveWithPassword

2

EncryptAllWithPassword

3

EncryptAllWithUserKey

4

ServerStorage

5

优先约束

EvalOp 属性 - 通过使用 DTSPrecedenceEvalOp 枚举中的值设置。

DTSPrecedenceEvalOp 中的友好名称 数值

Expression

1

Constraint

2

ExpressionAndConstraint

3

ExpressionOrConstraint

4

Value 属性 - 通过使用 DTSExecResult 枚举中的值设置。

友好名称 数值

Success

0

Failure

1

Completion

2

Canceled

3

Foreach 循环枚举器

Foreach 循环包括一组其属性可以由属性表达式设置的枚举器。

Foreach ADO 枚举器

Type 属性 - 通过使用 ADOEnumerationType 枚举中的值设置。

ADOEnumerationType 中的友好名称 数值

EnumerateTables

0

EnumerateAllRows

1

EnumerateRowsInFirstTable

2

Foreach Nodelist 枚举器

SourceDocumentTypeInnerXPathStringSourceTypeOuterXPathStringSourceType 属性 - 通过使用 SourceType 枚举中的值设置。

SourceType 中的友好名称 数值

FileConnection

0

Variable

1

DirectInput

2

EnumerationType 属性 - 通过使用 EnumerationType 枚举中的值设置。

EnumerationType 中的友好名称 数值

Navigator

0

Node

1

NodeText

2

ElementCollection

3

InnerElementType 属性 - 通过使用 InnerElementType 枚举中的值设置。

InnerElementType 中的友好名称 数值

Navigator

0

Node

1

NodeText

2

任务

Integration Services 包括许多其属性可以由属性表达式设置的任务。

ActiveX 脚本任务

ExecutionValueProperty 属性 - 通过使用 ExecutionValueChoice 枚举中的值设置。

ExecutionValueChoice 中的友好名称 数值

ScriptingLanguage

0

TotalTimeTaken

1

Analysis Services 执行 DDL 任务

SourceType 属性 - 通过使用 DDLSourceType 枚举中的值设置。

DDLSourceType 中的友好名称 数值

DirectInput

0

FileConnection

1

Variable

2

大容量插入任务

DataFileType 属性 - 通过使用 DTSBulkInsert_DataFileType 枚举中的值设置。

DTSBulkInsert_DataFileType 中的友好名称 数值

DTSBulkInsert_DataFileType_Char

0

DTSBulkInsert_DataFileType_Native

1

DTSBulkInsert_DataFileType_WideChar

2

DTSBulkInsert_DataFileType_WideNative

3

执行 SQL 任务

ResultSetType 属性 - 通过使用 ResultSetType 枚举中的值设置。

ResultSetType 中的友好名称 数值

ResultSetType_None

1

ResultSetType_SingleRow

2

ResultSetType_Rowset

3

ResultSetType_XML

4

SqlStatementSourceType 属性 - 通过使用 SqlStatementSourceType 枚举中的值设置。

SqlStatementSourceType 中的友好名称 数值

DirectInput

1

FileConnection

2

Variable

3

文件系统任务

Operation 属性 - 通过使用 DTSFileSystemOperation 枚举中的值设置。

DTSFileSystemOperation 中的友好名称 数值

CopyFile

0

MoveFile

1

DeleteFile

2

RenameFile

3

SetAttributes

4

CreateDirectory

5

CopyDirectory

6

MoveDirectory

7

DeleteDirectory

8

DeleteDirectoryContent

9

Attributes 属性 - 通过使用 DTSFileSystemAttributes 枚举中的值设置。

DTSFileSystemAttributes 中的友好名称 数值

Normal

0

Archive

1

Hidden

2

ReadOnly

4

System

8

FTP 任务

Operation 属性 - 通过使用 DTSFTPOp 枚举中的值设置。

DTSFTPOp 中的友好名称 数值

Send

0

Receive

1

DeleteLocal

2

DeleteRemote

3

MakeDirLocal

4

MakeDirRemote

5

RemoveDirLocal

6

RemoveDirRemote

7

消息队列任务

MessageType 属性 - 通过使用 MQMessageType 枚举中的值设置。

MQMessageType 中的友好名称 数值

DTSMQMessageType_String

0

DTSMQMessageType_DataFile

1

DTSMQMessageType_Variables

2

DTSMQMessagType_StringMessageToVariable

3

StringCompareType 属性 - 通过使用 MQStringMessageCompare 枚举中的值设置。

MQStringMessageCompare 中的友好名称 数值

DTSMQStringMessageCompare_None

0

DTSMQStringMessageCompare_Exact

1

DTSMQStringMessageCompare_IgnoreCase

2

DTSMQStringMessageCompare_Contains

3

TaskType 属性 - 通过使用 MQType 枚举中的值设置。

MQType 中的友好名称 数值

DTSMQType_Sender

0

DTSMQType_Receiver

1

发送邮件任务

MessageSourceType 属性 - 通过使用 SendMailMessageSourceType 枚举中的值设置。

SendMailMessageSourceType 中的友好名称 数值

DirectInput

0

FileConnection

1

Variable

2

Priority 属性 - 通过使用 MailPriority 枚举中的值设置。

MailPriority 中的友好名称 数值

High

1

Normal

3

Low

5

传输数据库任务

Action 属性 - 通过使用 TransferAction 枚举中的值设置。

TransferAction 中的友好名称 数值

Copy

0

Move

1

Method 属性 - 通过使用 TransferMethod 枚举中的值设置。

TransferMethod 中的友好名称 数值

DatabaseOffline

0

DatabaseOnline

1

传输错误消息任务

IfObjectExists 属性 - 通过使用 IfObjectExists 枚举中的值设置。

IfObjectExists 中的友好名称 数值

FailTask

0

Overwrite

1

Skip

2

传输作业任务

IfObjectExists 属性 - 通过使用 IfObjectExists 枚举中的值设置。

IfObjectExists 中的友好名称 数值

FailTask

0

Overwrite

1

Skip

2

传输登录名任务

IfObjectExists 属性 - 通过使用 IfObjectExists 枚举中的值设置。

IfObjectExists 中的友好名称 数值

FailTask

0

Overwrite

1

Skip

2

LoginsToTransfer 属性 - 通过使用 LoginsToTransfer 枚举中的值设置。

LoginsToTransfer 中的友好名称 数值

AllLogins

0

SelectedLogins

1

AllLoginsFromSelectedDatabases

2

传输主存储过程任务

IfObjectExists 属性 - 通过使用 IfObjectExists 枚举中的值设置。

IfObjectExists 中的友好名称 数值

FailTask

0

Overwrite

1

Skip

2

传输 SQL Server 对象任务

ExistingData 属性 - 通过使用 ExistingData 枚举中的值设置。

ExistingData 中的友好名称 数值

Replace

0

Append

1

Web 服务任务

OutputType 属性 - 通过使用 DTSOutputType 枚举中的值设置。

DTSOutputType 中的友好名称 数值

File

0

Variable

1

WMI 数据读取器任务

OverwriteDestination 属性 - 通过使用 OverwriteDestination 枚举中的值设置。

OverwriteDestination 中的友好名称 数值

OverwriteDestination

0

AppendToDestination

1

KeepOriginal

2

OutputType 属性 - 通过使用 OutputType 枚举中的值设置。

OutputType 中的友好名称 数值

DataTable

0

PropertyValue

1

PropertyNameAndValue

2

DestinationType 属性 - 通过使用 DestinationType 枚举中的值设置。

DestinationType 中的友好名称 数值

FileConnection

0

Variable

1

WqlQuerySourceType 属性 - 通过使用 QuerySourceType 枚举中的值设置。

QuerySourceType 中的友好名称 数值

FileConnection

0

DirectInput

1

Variable

2

WMI 事件观察器 ActionAtEvent 属性 - 通过使用 ActionAtEvent 枚举中的值设置。

ActionAtEvent 中的友好名称 数值

LogTheEventAndFireDTSEvent

0

LogTheEvent

1

ActionAtTimeout 属性 - 通过使用 ActionAtTimeout 枚举中的值设置。

ActionAtTimeout 中的友好名称 数值

LogTimeoutAndFireDTSEvent

0

LogTimeout

1

AfterEvent 属性 - 通过使用 AfterEvent 枚举中的值设置。

AfterEvent 中的友好名称 数值

ReturnWithSuccess

0

ReturnWithFailure

1

WatchfortheEventAgain

2

AfterTimeout 属性 - 通过使用 AfterTimeout 枚举中的值设置。

AfterTimeout 中的友好名称 数值

ReturnWithSuccess

0

ReturnWithFailure

1

WatchfortheEventAgain

2

WqlQuerySourceType 属性 - 通过使用 QuerySourceType 枚举中的值设置。

QuerySourceType 中的友好名称 数值

FileConnection

0

DirectInput

1

Variable

2

XML 任务

OperationType 属性 - 通过使用 DTSXMLOperation 枚举中的值设置。

DTSXMLOperation 中的友好名称 数值

Validate

0

XSLT

1

XPATH

2

Merge

3

Diff

4

Patch

5

SourceTypeSecondOperandTypeXPathSourceType 属性 - 通过使用 DTSXMLSourceType 枚举中的值设置。

DTSXMLSourceType 中的友好名称 数值

FileConnection

0

Variable

1

DirectInput

2

DestinationTypeDiffGramDestinationType 属性 - 通过使用 DTSXMLSaveResultTo 枚举中的值设置。

DTSXMLSaveResultTo 中的友好名称 数值

FileConnection

0

Variable

1

ValidationType 属性 - 通过使用 DTSXMLValidationType 枚举中的值设置。

DTSXMLValidationType 中的友好名称 数值

DTD

0

XSD

1

XPathOperation 属性 - 通过使用 DTSXMLXPathOperation 枚举中的值设置。

DTSXMLXPathOperation 中的友好名称 数值

Evaluation

0

Values

1

NodeList

2

DiffOptions 属性 - 通过使用 DTSXMLDiffOptions 枚举中的值设置。 此枚举器中的选项不相互排斥。 若要使用多个选项,请将要应用的选项作为逗号分隔的列表提供。

DTSXMLDiffOptions 中的友好名称 数值

None

0

IgnoreChildOrder

1

IgnoreComments

2

IgnorePI

4

IgnoreWhitespace

8

IgnoreNamespaces

16

IgnorePrefixes

32

IgnoreXmlDecl

64

IgnoreDtd

128

DiffAlgorithm 属性 - 通过使用 DTSXMLDiffAlgorithm 枚举中的值设置。

DTSXMLDiffAlgorithm 中的友好名称 数值

Auto

0

Fast

1

Precise

2

维护计划任务

Integration Services 包括的一组任务将执行在维护计划和 Integration Services 包中使用的 SQL Server 任务。

SQL Server 不支持通过编程来使用这些任务,而且编程参考文档不包括这些任务及其枚举器的 API 文档。

所有维护任务

所有维护任务均使用以下枚举来设置指定的属性。

DatabaseSelectionType 属性 - 通过使用 DatabaseSelection 枚举中的值设置。

DatabaseSelection 中的友好名称 数值

None

0

All

1

System

2

User

3

Specific

4

TableSelectionType 属性 - 通过使用 TableSelection 枚举中的值设置。

TableSelection 中的友好名称 数值

None

0

All

1

Specific

2

ObjectTypeSelection 属性 - 通过使用 ObjectType 枚举中的值设置。

ObjectType 中的友好名称 数值

Table

0

View

1

TableView

2

“备份数据库”任务

DestinationCreationType 属性 - 通过使用 DestinationType 枚举中的值设置。

DestinationType 中的友好名称 数值

Auto

0

Manual

1

ExistingBackupsAction 属性 - 通过使用 ActionForExistingBackups 枚举中的值设置。

ActionForExistingBackups 中的友好名称 数值

Append

0

Overwrite

1

BackupAction 属性 - 通过使用 BackupTaskType 枚举中的值设置。 此属性与 BackupIsIncremental 属性一起使用以定义该任务所执行的备份的类型。

BackupTaskType 中的友好名称 数值

Database

0

Files

1

Log

2

BackupDevice 属性 - 通过使用 SQL Server 管理对象 (SMO) DeviceType 枚举中的值设置。

DeviceType 中的友好名称 数值

LogicalDevice

0

Tape

1

File

2

Pipe

3

VirtualDevice

4

“清除维护”任务

FileTypeSelected 属性 - 通过使用 FileType 枚举中的值设置。

FileType 中的友好名称 数值

FileBackup

0

FileReport

1

OlderThanTimeUnitType 属性 - 通过使用 TimeUnitType 枚举中的值设置。

TimeUnitType 中的友好名称 数值

Day

0

Week

1

Month

2

Year

3

“更新统计信息”任务

UpdateType 属性 - 通过使用 SQL Server 管理对象 (SMO) StatisticsTarget 枚举中的值设置。

StatisticsTarget 中的友好名称 数值

Column

1

Index

2

All

3

通用属性

包、任务和 Foreach 循环、For 循环和序列容器可以使用以下枚举来设置指定的属性。

ForceExecutionResult 属性 - 通过使用 DTSForcedExecResult 枚举中的值设置。

DTSForcedExecResult 中的友好名称 数值

None

-1

Success

0

Failure

1

Completion

2

IsolationLevel 属性 - 由 .NET Framework IsolationLevel 枚举设置。 详细信息,请参阅位于 MSDN Library 中的 .NET Framework 类库。

LoggingMode 属性 - 通过使用 DTSLoggingMode 枚举中的值设置。

DTSLoggingMode 中的友好名称 数值

UseParentSetting

0

Enabled

1

Disabled

2

TransactionOption 属性 - 通过使用 DTSTransactionOption 枚举中的值设置。

DTSTransactionOption 中的友好名称 数值

NotSupported

0

Supported

1

Required

2

请参阅

任务

在包中使用属性表达式

概念

Integration Services 包
Integration Services 容器
Integration Services 任务
优先约束

帮助和信息

获取 SQL Server 2005 帮助