共用方式為


Package.MaxConcurrentExecutables Property

Gets or sets the number of threads that a package can create.

命名空間: Microsoft.SqlServer.Dts.Runtime
組件: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

語法

'宣告
Public Property MaxConcurrentExecutables As Integer
public int MaxConcurrentExecutables { get; set; }
public:
property int MaxConcurrentExecutables {
    int get ();
    void set (int value);
}
/** @property */
public int get_MaxConcurrentExecutables ()

/** @property */
public void set_MaxConcurrentExecutables (int value)
public function get MaxConcurrentExecutables () : int

public function set MaxConcurrentExecutables (value : int)

屬性值

An Integer that contains the number of threads that a package can create.

備註

更新的文字:2005 年 12 月 5 日

Valid values are one and higher, or -1. Other values are invalid. A value of -1 allows the maximum number of concurrently running executables to equal the number of processors plus two. Setting this property to zero or any other negative value fails with an error code that indicates an invalid argument.

This property is used when parallelism exists in the workflow. If the workflow is a series of sequential precedence constraints, then this property has no effect.

範例

The following code example sets the MaxConcurrentExecutables to 1, and sets that value on the ForEachLoop so the ForEachLoop will run one task at a time.

Package p;
p.MaxConcurrentExecutables = 1;
ForEachLoop loop;
loop.MaxConcurrent = p.MaxConcurrentExecutables;
Dim p As Package
p.MaxConcurrentExecutables = 1
Dim loop As ForEachLoop
loop.MaxConcurrent = p.MaxConcurrentExecutables

執行緒安全性

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

Package Class
Package Members
Microsoft.SqlServer.Dts.Runtime Namespace