設定封裝屬性Set Package Properties

當您使用 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:

在屬性視窗中設定封裝屬性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.
說明Description 封裝功能描述。A description of package functionality.
IDID 在建立封裝時所指派的封裝 GUID。The package GUID, which is assigned when the package is created. 此屬性是唯讀的。This property is read-only. 若要產生新的隨機值,如識別碼屬性選取<產生新的識別碼>下拉式清單中。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.

Security Security

此類別中的屬性是用來設定封裝的保護等級。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.