设置包属性Set Package Properties

适用对象:是SQL Server,包含 Linux 版 是Azure SQL 数据库 是Azure Synapse Analytics (SQL DW) 否并行数据仓库 APPLIES TO: yesSQL Server, including on Linux yesAzure SQL Database yesAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) 中使用 Integration ServicesIntegration Services 提供的图形界面创建包时,可以在“属性”窗口中设置包对象的各个属性。When you create a package in SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) by using the graphical interface that Integration ServicesIntegration Services provides, you set the properties of the package object in the Properties window.

“属性” 窗口按分类和字母顺序排序列出了一系列属性列表。The Properties window provides a categorized and alphabetical list of properties. 若要按类别排列 “属性” 窗口,请单击“按分类顺序”图标。To arrange the Properties window by category, click the Categorized icon.

按类别排列时, “属性” 窗口将属性分成以下类别:When arranged by category, the Properties window groups properties in the following categories:

有关不能在“属性” 窗口中设置的其他包属性的信息,请参阅 PackageFor information about additional package properties that you cannot set in the Properties window, see Package.

在“属性”窗口中设置包属性To set package properties in the Properties window

按类别排列的属性Properties by Category

下表列出了按类别排列的包属性。The following tables list the package properties by category.

检查点Checkpoints

使用此类别中的属性可以从包控制流中的某一故障点重新启动包,而不是从包控制流的开始处重新运行包。You can use the properties in this category to restart the package from a point of failure in the package control flow, instead of rerunning the package from the beginning of its control flow. 有关详细信息,请参阅 Restart Packages by Using CheckpointsFor more information, see Restart Packages by Using Checkpoints.

属性Property 描述Description
CheckpointFileNameCheckpointFileName 用于捕获使包重新启动的检查点信息的文件的名称。The name of the file that captures the checkpoint information that enables a package to restart. 当包成功完成时,该文件便会被删除。When the package finishes successfully, this file is deleted.
CheckpointUsageCheckpointUsage 指定何时可以重新启动包。Specifies when a package can be restarted. 具体的值为 NeverIfExistsAlwaysThe values are Never, IfExists, and Always. 此属性的默认值为 Never,指示包不能重新启动。The default value of this property is Never, which indicates that the package cannot be restarted. 有关详细信息,请参阅 DTSCheckpointUsageFor more information, see DTSCheckpointUsage.
SaveCheckpointsSaveCheckpoints 指定在包运行时,是否将检查点写入检查点文件。Specifies whether the checkpoints are written to the checkpoint file when the package runs. 此属性的默认值为 FalseThe default value of this property is False.

备注

dtexec 的 /CheckPointing on 选项等效于将包的 SaveCheckpoints 属性设置为 True,并将 CheckpointUsage 属性设置为“Always”。The /CheckPointing on option of dtexec is equivalent to setting the SaveCheckpoints property of the package to True, and the CheckpointUsage property to Always. 有关详细信息,请参阅 dtexec UtilityFor more information, see dtexec Utility.

执行Execution

此类别中的属性可配置包对象的运行时行为。The properties in this category configure the run-time behavior of the package object.

属性Property 描述Description
DelayValidationDelayValidation 指示是否将包验证推迟至包运行之时进行。Indicates whether package validation is delayed until the package runs. 此属性的默认值为 FalseThe default value for this property is False.
DisableDisable 指示包是否已禁用。Indicates whether the package is disabled. 此属性的默认值为 FalseThe default value of this property is False.
DisableEventHandlersDisableEventHandlers 指定包事件处理程序是否运行。Specifies whether the package event handlers run. 此属性的默认值为 FalseThe default value of this property is False.
FailPackageOnFailureFailPackageOnFailure 指定如果包组件中出现错误时,包是否失败。Specifies whether the package fails if an error occurs in a package component. 此属性的唯一有效值为 FalseThe only valid value of this property is False.
FailParentOnErrorFailParentOnError 指定如果子容器中出现错误,父容器是否失败。Specifies whether the parent container fails if an error occurs in a child container. 该属性的默认值为 FalseThe default value is of this property is False.
MaxConcurrentExecutablesMaxConcurrentExecutables 包可以同时执行的可执行文件数目。The number of executable files that the package can run concurrently. 此属性的默认值为 -1,表示没有任何限制。The default value of this property is -1, which indicates that there is no limit.
MaximumErrorCountMaximumErrorCount 包停止运行前可以出现的最大错误数。The maximum number of errors that can occur before a package stops running. 此属性的默认值为 1The default value of this property is 1.
PackagePriorityClassPackagePriorityClass 包线程的 Win32 线程优先级类。The Win32 thread priority class of the package thread. 其值分别为 DefaultAboveNormalNormalBelowNormalIdleThe values are Default, AboveNormal, Normal, BelowNormal, Idle. 此属性的默认值为 DefaultThe default value of this property is Default. 有关详细信息,请参阅 DTSPriorityClassFor more information, see DTSPriorityClass.

强制执行值Forced Execution Value

此类别中的属性用于配置包的可选执行值。The properties in this category configure an optional execution value for the package.

属性Property 描述Description
ForcedExecutionValueForcedExecutionValue 如果 ForceExecutionValue 设置为 True,则为用于指定包返回的可选执行值的值。If ForceExecutionValue is set to True, a value that specifies the optional execution value that the package returns. 此属性的默认值为 0The default value of this property is 0.
ForcedExecutionValueTypeForcedExecutionValueType ForcedExecutionValue 的数据类型。The data type of ForcedExecutionValue. 此属性的默认值为 Int32The default value of this property is Int32.
ForceExecutionValueForceExecutionValue 指定容器的可选执行值是否应强制包含特定值的布尔值。A Boolean value that specifies whether the optional execution value of the container should be forced to contain a particular value. 此属性的默认值为 FalseThe default value of this property is False.

标识Identification

此类别中的属性提供诸如包的唯一标识符和名称等信息。The properties in this category provide information such as the unique identifier and name of the package.

属性Property 描述Description
CreationDateCreationDate 包的创建日期。The date that the package was created.
CreatorComputerNameCreatorComputerName 创建包的计算机的名称。The name of the computer on which the package was created.
CreatorNameCreatorName 包创建者的姓名。The name of the person who created the package.
DescriptionDescription 包功能说明。A description of package functionality.
IDID 包 GUID,该属性是在创建包时分配的。The package GUID, which is assigned when the package is created. 该属性为只读。This property is read-only. 若要生成 ID 属性的新随机值,请在下拉列表中选择 <“生成新 ID”> 。To generate a new random value for the ID property, select <Generate New ID> in the drop-down list.
名称Name 包的名称。The name of the package.
PackageTypePackageType 包类型。The package type. 其值为: DefaultDTSDesignerDTSDesigner100DTSWizardSQLDBMaintSQLReplicationThe values are Default, DTSDesigner, DTSDesigner100, DTSWizard, SQLDBMaint, and SQLReplication. 此属性的默认值为 DefaultThe default value of this property is Default. 有关详细信息,请参阅 DTSPackageTypeFor more information, see DTSPackageType.

杂项Misc

此类别中的属性用于访问包所使用的配置和表达式,以及提供有关包的区域设置和日志记录模式的信息。The properties in this category are used to access the configurations and expressions that a package uses and to provide information about the locale and logging mode of the package. 有关详细信息,请参阅 在包中使用属性表达式For more information, see Use Property Expressions in Packages.

属性Property 描述Description
配置Configurations 包使用的配置集合。The collection of configurations that the package uses. 单击浏览按钮 (…) 可以查看和配置包配置 。Click the browse button (...) to view and configure package configurations.
表达式Expressions 单击浏览按钮 (…) 可以为包属性创建表达式 。Click the browse button (...) to create expressions for package properties.

请注意,你可以为对象模型包含的所有包属性(而不仅仅是“属性”窗口中列出的属性)创建属性表达式。Note that you can create property expressions for all the package properties that object model includes, not just the properties listed in the Properties window.

有关详细信息,请参阅在包中使用属性表达式For more information, see Use Property Expressions in Packages.

若要查看现有的属性表达式,请展开 ExpressionsTo view existing property expressions, expand Expressions. 单击表达式文本框中的浏览按钮 (…) 可以修改和计算表达式 。Click the browse button (...) in an expression text box to modify and evaluate an expression.
ForceExecutionResultForceExecutionResult 包的执行结果。The execution result of the package. 其值为: NoneSuccessFailureCompletionThe values are None, Success, Failure, and Completion. 此属性的默认值为 NoneThe default value of this property is None. 有关详细信息,请参阅 T:Microsoft.SqlServer.Dts.Runtime.DTSForcedExecResult。For more information, see T:Microsoft.SqlServer.Dts.Runtime.DTSForcedExecResult.
LocaleIdLocaleId Microsoft Win32 区域设置。A Microsoft Win32 locale. 此属性的默认值为本地计算机上操作系统的区域设置。The default value of this property is the locale of the operating system on the local computer.
LoggingModeLoggingMode 指定包日志记录行为的值。A value that specifies the logging behavior of the package. 具体的值为 DisabledEnabledUseParentSettingThe values are Disabled, Enabled, and UseParentSetting. 此属性的默认值为 UseParentSettingThe default value of this property is UseParentSetting. 有关详细信息,请参阅 DTSLoggingModeFor more information, see DTSLoggingMode.
OfflineModeOfflineMode 指示该包是否处于脱机模式下。Indicates whether the package is in offline mode. 该属性为只读。This property is read-only. 该属性在项目级设置。The property is set at the project level. 通常, SSISSSIS 设计器将尝试连接包使用的每个数据源以验证与源和目标相关联的元数据。Normally, SSISSSIS Designer tries to connect to each data source used by your package to validate the metadata associated with sources and destinations. 您可以从 “SSIS” 菜单中启用 “脱机工作” (即使在打开包之前也可以)以阻止这些连接尝试和数据源不可用时导致的验证错误。You can enable Work Offline from the SSIS menu, even before you open a package, to prevent these connection attempts and the resulting validation errors when the data sources are not available. 您还可以启用 “脱机工作” 以加快设计器中操作的速度,而仅在需要验证包的时候再禁用此选项。You can also enable Work Offline to speed up operations in the designer, and disable it only when you want your package to be validated.
SuppressConfigurationWarningsSuppressConfigurationWarnings 指示是否取消配置生成的警告。Indicates whether the warnings generated by configurations are suppressed. 此属性的默认值为 FalseThe default value of this property is False.
UpdateObjectsUpdateObjects 指示当包所含对象的更新版本可用时,是否更新包以使用更新版本的对象。Indicates whether the package is updated to use newer versions of the objects it contains, if newer versions are available. 例如,如果此属性设置为 True,则会更新包含大容量插入任务的包,以使用 Integration ServicesIntegration Services 所提供的更新版本的大容量插入任务。For example, if this property is set to True, a package that includes a Bulk Insert task is updated to use the newer version of the Bulk Insert task that Integration ServicesIntegration Services provides. 此属性的默认值为 FalseThe default value of this property is False.

SecuritySecurity

此类别中的属性用于设置包的保护级别。The properties in this category are used to set the protection level of the package. 有关详细信息,请参阅 Access Control for Sensitive Data in PackagesFor more information, see Access Control for Sensitive Data in Packages.

属性Property 描述Description
PackagePasswordPackagePassword 需要密码的包保护级别 (EncryptSensitiveWithPasswordEncryptAllWithPassword) 的密码。The password for package protection levels (EncryptSensitiveWithPassword and EncryptAllWithPassword) that require passwords.
ProtectionLevelProtectionLevel 包的保护级别。The protection level of the package. 其值为: DontSaveSensitiveEncryptSensitiveWithUserKeyEncryptSensitiveWithPasswordEncryptAllWithPasswordServerStorageThe values are DontSaveSensitive, EncryptSensitiveWithUserKey, EncryptSensitiveWithPassword, EncryptAllWithPassword, and ServerStorage. 此属性的默认值为 EncryptSensitiveWithUserKeyThe default value of this property is EncryptSensitiveWithUserKey. 有关详细信息,请参阅 DTSProtectionLevelFor more information, see DTSProtectionLevel.

中的Transactions

此类别中的属性用于配置包的隔离级别和事务选项。The properties in this category configure the isolation level and the transaction option of the package. 有关详细信息,请参阅 Integration Services 事务For more information, see Integration Services Transactions.

属性Property 描述Description
IsolationLevelIsolationLevel 包事务的隔离级别。The isolation level of the package transaction. 其值为: UnspecifiedChaosReadUncommittedReadCommittedRepeatableReadSerializableSnapshotThe values are Unspecified, Chaos, ReadUncommitted, ReadCommitted, RepeatableRead, Serializable, and Snapshot. 此属性的默认值为 SerializableThe default value of this property is Serializable.

注意:IsolationLevel 属性的 Snapshot 值与包事务不兼容。Note: The Snapshot value of the IsolationLevel property is incompatible with package transactions. 因此,您无法使用 IsolationLevel 属性将包事务的隔离级别设为 ShapshotTherefore, you cannot use the IsolationLevel property to set the isolation level of package transactions to Shapshot. 而是使用 SQL 查询将包事务设为 SnapshotInstead, use an SQL query to set package transactions to Snapshot. 有关详细信息,请参阅 SET TRANSACTION ISOLATION LEVEL (Transact-SQL)For more information, see SET TRANSACTION ISOLATION LEVEL (Transact-SQL).

仅当 IsolationLevel 属性的值设为 TransactionOption 时,系统才将 Required属性应用到包事务。The system applies the IsolationLevel property to package transactions only when the value of the TransactionOption property is Required.

在以下条件成立时,将忽略子容器请求的 IsolationLevel 属性的值:The value of the IsolationLevel property requested by a child container is ignored when the following conditions are true:
子容器的 TransactionOption 属性的值为 SupportedThe value of the child container's TransactionOption property is Supported.
子容器联接父容器的事务。The child container joins the transaction of a parent container.

只有在容器开始新的事务时,才遵从该容器请求的 IsolationLevel 属性的值。The value of the IsolationLevel property requested by the container is respected only when the container initiates a new transaction. 在以下条件成立时,容器将开始新的事务:A container initiates a new transaction when the following conditions are true:
容器的 TransactionOption 属性的值为 RequiredThe value of the container's TransactionOption property is Required.
父级已开始一个事务。The parent has not already started a transaction.



有关详细信息,请参阅 IsolationLevelFor more information, see IsolationLevel.
TransactionOptionTransactionOption 包的事务参与情况。The transactional participation of the package. 其值为: NotSupportedSupportedRequiredThe values are NotSupported, Supported, Required. 此属性的默认值为 SupportedThe default value of this property is Supported. 有关详细信息,请参阅 DTSTransactionOptionFor more information, see DTSTransactionOption.

版本Version

此类别中的属性用于提供包对象的版本信息。The properties in this category provide information about the version of the package object.

属性Property 描述Description
VersionBuildVersionBuild 包的内部版本号。The version number of the build of the package.
VersionCommentsVersionComments 包的版本注释。Comments about the version of the package.
VersionGUIDVersionGUID 包版本的 GUID。The GUID of the version of the package. 该属性为只读。This property is read-only.
VersionMajorVersionMajor 包的最新主版本。The latest major version of the package.
VersionMinorVersionMinor 包的最新次版本。The latest minor version of the package.

在“属性”窗口中设置包属性Set package properties in the Properties window

  1. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)中,打开要配置的包所在的 Integration ServicesIntegration Services 项目。In SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT), open the Integration ServicesIntegration Services project that contains the package you want to configure.

  2. 在 “解决方案资源管理器”中双击此包,将其在 SSISSSIS 设计器中打开,或者右键单击并选择“视图设计器” 。In Solution Explorer, double-click the package to open it in SSISSSIS Designer, or right-click and select View Designer.

  3. 单击 “控制流” 选项卡,然后执行下列操作之一:Click the Control Flow tab and then do one of the following:

    • 右键单击控制流设计图面背景中的任意位置,然后单击“属性” 。Right-click anywhere in the background of the control flow design surface, and then click Properties.

    • “视图” 菜单上,单击 “属性窗口”On the View menu, click Properties Window.

  4. “属性” 窗口中编辑包属性。Edit the package properties in the Properties window.

  5. “文件” 菜单上单击 “保存选定项” ,保存已更新的包。On the File menu, click Save Selected Items to save the updated package.