如果属性表达式包括枚举器成员列表中的值,则该表达式必须使用枚举器成员的数值,而不是成员的友好名称。 例如,如果表达式设置 LoggingMode 属性,则必须使用数值 2 而不是友好名称“Disabled”。
此主题只列出通常会在属性表达式中使用其成员的枚举器的友好名称的等价数值。 Integration Services 对象模型包括很多其他枚举器,在编写对象模型以便以编程方式生成包时,或为任务和数据流组件等自定义包元素编写代码时,需要使用这些枚举器。
除了包和包对象的自定义属性外, SQL Server Data Tools (SSDT) 中的“属性”窗口还包括一组可用于包、任务以及 Foreach 循环、For 循环和序列容器的属性。 由枚举器、ForceExecutionResultLoggingMode、 IsolationLevel和 Transaction Option中的值设置的公共属性列在“通用属性”部分中。
以下部分提供了有关枚举常量的信息:
包
下表列出了通过使用枚举器中的值所设置的包的属性的友好名称和等价数值。
PackageType property-通过使用 枚举中的 DTSPackageType 值设置。
| DTSPackageType 中的友好名称 | 数值 |
|---|---|
| 默认 | 0 |
| DTSWizard | 1 |
| DTSDesigner | 2 |
| SQLReplication | 3 |
| DTSDesigner100 | 5 |
| SQLDBMaint | 6 |
CheckpointUsage property-通过使用 枚举中的 DTSCheckpointUsage 值设置。
| DTSCheckpointUsage 中的友好名称 | 数值 |
|---|---|
| 从不 | 0 |
| IfExists | 1 |
| 始终 | 2 |
PackagePriorityClass property-通过使用 枚举中的 DTSPriorityClass 值设置。
| DTSPriorityClass 中的友好名称 | 数值 |
|---|---|
| 默认 | 0 |
| AboveNormal | 1 |
| 普通 | 2 |
| BelowNormal | 3 |
| 空闲 | 4 |
ProtectionLevel property-通过使用 枚举中的 DTSProtectionLevel 值设置。
| DTSProtectionLevel 中的友好名称 | 数值 |
|---|---|
| DontSaveSensitive | 0 |
| EncryptSensitiveWithUserKey | 1 |
| EncryptSensitiveWithPassword | 2 |
| EncryptAllWithPassword | 3 |
| EncryptAllWithUserKey | 4 |
| ServerStorage | 5 |
优先约束
EvalOp property-通过使用 枚举中的 DTSPrecedenceEvalOp 值设置。
| DTSPrecedenceEvalOp 中的友好名称 | 数值 |
|---|---|
| Expression | 1 |
| 约束 | 2 |
| ExpressionAndConstraint | 3 |
| ExpressionOrConstraint | 4 |
Value property-通过使用 枚举中的 DTSExecResult 值设置。
| 友好名称 | 数值 |
|---|---|
| Success | 0 |
| 失败 | 1 |
| Completion | 2 |
| 已取消 | 3 |
Foreach 循环枚举器
Foreach 循环包括一组其属性可以由属性表达式设置的枚举器。
Foreach ADO 枚举器
Type property-通过使用 枚举中的 ADOEnumerationType 值设置。
| ADOEnumerationType 中的友好名称 | 数值 |
|---|---|
| EnumerateTables | 0 |
| EnumerateAllRows | 1 |
| EnumerateRowsInFirstTable | 2 |
Foreach Nodelist 枚举器
SourceDocumentType、 InnerXPathStringSourceType和 OuterXPathStringSourceType 属性-通过使用枚举中的 SourceType 值设置。
| SourceType 中的友好名称 | 数值 |
|---|---|
| 文件连接 | 0 |
| 变量 | 1 |
| DirectInput | 2 |
EnumerationType property-Set by using the values from the EnumerationType enumeration.
| EnumerationType 中的友好名称 | 数值 |
|---|---|
| 导航器 | 0 |
| 节点 | 1 |
| NodeText | 2 |
| ElementCollection | 3 |
InnerElementType property-Set by using the values from the InnerElementType enumeration.
| InnerElementType 中的友好名称 | 数值 |
|---|---|
| 导航器 | 0 |
| 节点 | 1 |
| NodeText | 2 |
任务
Integration Services 包括许多其属性可以由属性表达式设置的任务。
Analysis Services 执行 DDL 任务
SourceType property-Set by using the values from the DDLSourceType enumeration.
| DDLSourceType 中的友好名称 | 数值 |
|---|---|
| DirectInput | 0 |
| 文件连接 | 1 |
| 变量 | 2 |
大容量插入任务
DataFileType property-Set by using the values from the DTSBulkInsert_DataFileType enumeration.
| DTSBulkInsert_DataFileType 中的友好名称 | 数值 |
|---|---|
| DTSBulkInsert_DataFileType_Char | 0 |
| DTSBulkInsert_DataFileType_Native | 1 |
| DTSBulkInsert_DataFileType_WideChar | 2 |
| DTSBulkInsert_DataFileType_WideNative | 3 |
执行 SQL 任务
ResultSetType property-Set by using the values from the ResultSetType enumeration.
| ResultSetType 中的友好名称 | 数值 |
|---|---|
| ResultSetType_None | 1 |
| ResultSetType_SingleRow | 2 |
| ResultSetType_Rowset | 3 |
| ResultSetType_XML | 4 |
SqlStatementSourceType property-Set by using the values from the SqlStatementSourceType enumeration.
| SqlStatementSourceType 中的友好名称 | 数值 |
|---|---|
| DirectInput | 1 |
| 文件连接 | 2 |
| 变量 | 3 |
文件系统任务
Operation property-Set by using the values from the DTSFileSystemOperation enumeration.
| DTSFileSystemOperation 中的友好名称 | 数值 |
|---|---|
| CopyFile | 0 |
| MoveFile | 1 |
| DeleteFile | 2 |
| RenameFile | 3 |
| SetAttributes | 4 |
| CreateDirectory | 5 |
| CopyDirectory | 6 |
| MoveDirectory | 7 |
| DeleteDirectory | 8 |
| DeleteDirectoryContent | 9 |
Attributes property-Set by using the values from the DTSFileSystemAttributes enumeration.
| DTSFileSystemAttributes 中的友好名称 | 数值 |
|---|---|
| 普通 | 0 |
| 存档 | 1 |
| Hidden | 2 |
| ReadOnly | 4 |
| 系统 | 8 |
FTP 任务
Operation property-Set by using the values from the DTSFTPOp enumeration.
| DTSFTPOp 中的友好名称 | 数值 |
|---|---|
| 发送 | 0 |
| 接收 | 1 |
| DeleteLocal | 2 |
| DeleteRemote | 3 |
| MakeDirLocal | 4 |
| MakeDirRemote | 5 |
| RemoveDirLocal | 6 |
| RemoveDirRemote | 7 |
Message Queue Task
MessageType property-Set by using the values from the MQMessageType enumeration.
| MQMessageType 中的友好名称 | 数值 |
|---|---|
| DTSMQMessageType_String | 0 |
| DTSMQMessageType_DataFile | 1 |
| DTSMQMessageType_Variables | 2 |
| DTSMQMessagType_StringMessageToVariable | 3 |
StringCompareType property-Set by using the values from the MQStringMessageCompare enumeration.
| MQStringMessageCompare 中的友好名称 | 数值 |
|---|---|
| DTSMQStringMessageCompare_None | 0 |
| DTSMQStringMessageCompare_Exact | 1 |
| DTSMQStringMessageCompare_IgnoreCase | 2 |
| DTSMQStringMessageCompare_Contains | 3 |
TaskType property-Set by using the values from the MQType enumeration.
| MQType 中的友好名称 | 数值 |
|---|---|
| DTSMQType_Sender | 0 |
| DTSMQType_Receiver | 1 |
发送邮件任务
MessageSourceType property-Set by using the values from the SendMailMessageSourceType enumeration.
| SendMailMessageSourceType 中的友好名称 | 数值 |
|---|---|
| DirectInput | 0 |
| 文件连接 | 1 |
| 变量 | 2 |
Priority property-Set by using the values from the MailPriority enumeration.
| MailPriority 中的友好名称 | 数值 |
|---|---|
| 高 | 1 |
| 普通 | 3 |
| 低 | 5 |
传输数据库任务
Action property-Set by using the values from the TransferAction enumeration.
| TransferAction 中的友好名称 | 数值 |
|---|---|
| 复制 | 0 |
| 移动 | 1 |
Method property-Set by using the values from the TransferMethod enumeration.
| TransferMethod 中的友好名称 | 数值 |
|---|---|
| DatabaseOffline | 0 |
| DatabaseOnline | 1 |
传输错误消息任务
IfObjectExists property-通过使用 枚举中的 IfObjectExists 值设置。
| IfObjectExists 中的友好名称 | 数值 |
|---|---|
| FailTask | 0 |
| Overwrite | 1 |
| 跳过 | 2 |
传输作业任务
IfObjectExists property-通过使用 枚举中的 IfObjectExists 值设置。
| IfObjectExists 中的友好名称 | 数值 |
|---|---|
| FailTask | 0 |
| Overwrite | 1 |
| 跳过 | 2 |
传输登录名任务
IfObjectExists property-通过使用 枚举中的 IfObjectExists 值设置。
| IfObjectExists 中的友好名称 | 数值 |
|---|---|
| FailTask | 0 |
| Overwrite | 1 |
| 跳过 | 2 |
LoginsToTransfer property-通过使用 枚举中的 LoginsToTransfer 值设置。
| LoginsToTransfer 中的友好名称 | 数值 |
|---|---|
| AllLogins | 0 |
| SelectedLogins | 1 |
| AllLoginsFromSelectedDatabases | 2 |
传输主存储过程任务
IfObjectExists property-通过使用 枚举中的 IfObjectExists 值设置。
| IfObjectExists 中的友好名称 | 数值 |
|---|---|
| FailTask | 0 |
| Overwrite | 1 |
| 跳过 | 2 |
传输 SQL Server 对象任务
ExistingData property-通过使用 枚举中的 ExistingData 值设置。
| ExistingData 中的友好名称 | 数值 |
|---|---|
| Replace | 0 |
| 追加 | 1 |
Web 服务任务
OutputType property-通过使用 枚举中的 DTSOutputType 值设置。
| DTSOutputType 中的友好名称 | 数值 |
|---|---|
| 文件 | 0 |
| 变量 | 1 |
WMI 数据读取器任务
OverwriteDestination property-通过使用 枚举中的 OverwriteDestination 值设置。
| OverwriteDestination 中的友好名称 | 数值 |
|---|---|
| OverwriteDestination | 0 |
| AppendToDestination | 1 |
| KeepOriginal | 2 |
OutputType property-通过使用 枚举中的 OutputType 值设置。
| OutputType 中的友好名称 | 数值 |
|---|---|
| DataTable | 0 |
| PropertyValue | 1 |
| PropertyNameAndValue | 2 |
DestinationType property-通过使用 枚举中的 DestinationType 值设置。
| DestinationType 中的友好名称 | 数值 |
|---|---|
| 文件连接 | 0 |
| 变量 | 1 |
WqlQuerySourceType property-通过使用 枚举中的 QuerySourceType 值设置。
| QuerySourceType 中的友好名称 | 数值 |
|---|---|
| 文件连接 | 0 |
| DirectInput | 1 |
| 变量 | 2 |
WMI 事件观察程序 ActionAtEvent 属性 - 使用 枚举中的 ActionAtEvent 值设置。
| ActionAtEvent 中的友好名称 | 数值 |
|---|---|
| LogTheEventAndFireDTSEvent | 0 |
| LogTheEvent | 1 |
ActionAtTimeout property-通过使用 枚举中的 ActionAtTimeout 值设置。
| ActionAtTimeout 中的友好名称 | 数值 |
|---|---|
| LogTimeoutAndFireDTSEvent | 0 |
| LogTimeout | 1 |
AfterEvent property-通过使用 枚举中的 AfterEvent 值设置。
| AfterEvent 中的友好名称 | 数值 |
|---|---|
| ReturnWithSuccess | 0 |
| ReturnWithFailure | 1 |
| WatchfortheEventAgain | 2 |
AfterTimeout property-通过使用 枚举中的 AfterTimeout 值设置。
| AfterTimeout 中的友好名称 | 数值 |
|---|---|
| ReturnWithSuccess | 0 |
| ReturnWithFailure | 1 |
| WatchfortheEventAgain | 2 |
WqlQuerySourceType property-通过使用 枚举中的 QuerySourceType 值设置。
| QuerySourceType 中的友好名称 | 数值 |
|---|---|
| 文件连接 | 0 |
| DirectInput | 1 |
| 变量 | 2 |
XML 任务
OperationType property-通过使用 枚举中的 DTSXMLOperation 值设置。
| DTSXMLOperation 中的友好名称 | 数值 |
|---|---|
| 验证 | 0 |
| XSLT | 1 |
| XPATH | 2 |
| 合并 | 3 |
| 差异 | 4 |
| 修补程序 | 5 |
SourceType、 SecondOperandType和 XPathSourceType properties - 使用 枚举中的 DTSXMLSourceType 值设置。
| DTSXMLSourceType 中的友好名称 | 数值 |
|---|---|
| 文件连接 | 0 |
| 变量 | 1 |
| DirectInput | 2 |
DestinationType 和 DiffGramDestinationType 属性 - 通过使用枚举中的 DTSXMLSaveResultTo 值设置。
| DTSXMLSaveResultTo 中的友好名称 | 数值 |
|---|---|
| 文件连接 | 0 |
| 变量 | 1 |
ValidationType property-通过使用 枚举中的 DTSXMLValidationType 值设置。
| DTSXMLValidationType 中的友好名称 | 数值 |
|---|---|
| DTD | 0 |
| XSD | 1 |
XPathOperation property-通过使用 枚举中的 DTSXMLXPathOperation 值设置。
| DTSXMLXPathOperation 中的友好名称 | 数值 |
|---|---|
| 计算 | 0 |
| 值 | 1 |
| NodeList | 2 |
DiffOptions property-通过使用 枚举中的 DTSXMLDiffOptions 值设置。 此枚举器中的选项不相互排斥。 若要使用多个选项,请将要应用的选项作为逗号分隔的列表提供。
| DTSXMLDiffOptions 中的友好名称 | 数值 |
|---|---|
| 无 | 0 |
| IgnoreChildOrder | 1 |
| IgnoreComments | 2 |
| IgnorePI | 4 |
| IgnoreWhitespace | 8 |
| IgnoreNamespaces | 16 |
| IgnorePrefixes | 32 |
| IgnoreXmlDecl | 64 |
| IgnoreDtd | 128 |
DiffAlgorithm property-Set by using the values from the DTSXMLDiffAlgorithm enumeration.
| DTSXMLDiffAlgorithm 中的友好名称 | 数值 |
|---|---|
| 自动 | 0 |
| Fast | 1 |
| 精确 | 2 |
维护计划任务
Integration Services 包括的一组任务将执行在维护计划和 Integration Services 包中使用的 SQL Server 任务。
SQL Server 不支持通过编程来使用这些任务,而且编程参考文档不包括这些任务及其枚举器的 API 文档。
所有维护任务
所有维护任务均使用以下枚举来设置指定的属性。
DatabaseSelectionType property-Set by using the values from the DatabaseSelection enumeration.
| DatabaseSelection 中的友好名称 | 数值 |
|---|---|
| 无 | 0 |
| 全部 | 1 |
| 系统 | 2 |
| 用户 | 3 |
| 特定 | 4 |
TableSelectionType property-Set by using the values from the TableSelection enumeration.
| TableSelection 中的友好名称 | 数值 |
|---|---|
| 无 | 0 |
| 全部 | 1 |
| 特定 | 2 |
ObjectTypeSelection property-Set by using the values from the ObjectType enumeration.
| ObjectType 中的友好名称 | 数值 |
|---|---|
| 表 | 0 |
| 视图 | 1 |
| TableView | 2 |
“备份数据库”任务
DestinationCreationType property-Set by using the values from the DestinationType enumeration.
| DestinationType 中的友好名称 | 数值 |
|---|---|
| 自动 | 0 |
| 手动 | 1 |
ExistingBackupsAction property-Set by using the values from the ActionForExistingBackups enumeration.
| ActionForExistingBackups 中的友好名称 | 数值 |
|---|---|
| 追加 | 0 |
| Overwrite | 1 |
BackupAction property-Set by using the values from the BackupTaskType enumeration. 此属性与 BackupIsIncremental 属性一起使用以定义该任务所执行的备份的类型。
| BackupTaskType 中的友好名称 | 数值 |
|---|---|
| 数据库 | 0 |
| 文件 | 1 |
| 日志 | 2 |
BackupDeviceproperty-Set by using the SQL Server Management Objects (SMO) DeviceType 枚举的值。
| DeviceType 中的友好名称 | 数值 |
|---|---|
| LogicalDevice | 0 |
| 磁带 | 1 |
| 文件 | 2 |
| 管道 | 3 |
| VirtualDevice | 4 |
“清除维护”任务
FileTypeSelected property-Set by using the values from the FileType enumeration.
| FileType 中的友好名称 | 数值 |
|---|---|
| FileBackup | 0 |
| FileReport | 1 |
OlderThanTimeUnitType property-Set by using the values from the TimeUnitType enumeration.
| TimeUnitType 中的友好名称 | 数值 |
|---|---|
| 天 | 0 |
| 周 | 1 |
| 月份 | 2 |
| Year | 3 |
“更新统计信息”任务
UpdateTypeproperty-Set by using the SQL Server Management Objects (SMO) StatisticsTarget 枚举的值。
| StatisticsTarget 中的友好名称 | 数值 |
|---|---|
| 列 | 1 |
| 索引 | 2 |
| 全部 | 3 |
通用属性
包、任务和 Foreach 循环、For 循环和序列容器可以使用以下枚举来设置指定的属性。
ForceExecutionResult property-Set by using the values from the DTSForcedExecResult enumeration.
| DTSForcedExecResult 中的友好名称 | 数值 |
|---|---|
| 无 | -1 |
| Success | 0 |
| 失败 | 1 |
| Completion | 2 |
IsolationLevelproperty-由.NET FrameworkIsolationLevel枚举设置。 详细信息,请参阅位于 MSDN Library中的 .NET Framework 类库。
LoggingMode property-Set by using the values from the DTSLoggingMode enumeration.
| DTSLoggingMode 中的友好名称 | 数值 |
|---|---|
| UseParentSetting | 0 |
| 已启用 | 1 |
| 已禁用 | 2 |
TransactionOption property-Set by using the values from the DTSTransactionOption enumeration.
| DTSTransactionOption 中的友好名称 | 数值 |
|---|---|
| NotSupported | 0 |
| 支持 | 1 |
| 必须 | 2 |
Related Tasks
另请参阅
在包中使用属性表达式
Integration Services (SSIS) 包
Integration Services 容器
Integration Services 任务
优先约束