IDTSExecutionMetrics.ExecutionDuration プロパティ

コンテナーが実行中に費やした時間をミリ秒単位で示す値を返します。 このプロパティは読み取り専用です。

名前空間:  Microsoft.SqlServer.Dts.Runtime
アセンブリ:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS.dll)

構文

'宣言
ReadOnly Property ExecutionDuration As Integer 
    Get
'使用
Dim instance As IDTSExecutionMetrics 
Dim value As Integer 

value = instance.ExecutionDuration
int ExecutionDuration { get; }
property int ExecutionDuration {
    int get ();
}
abstract ExecutionDuration : int
function get ExecutionDuration () : int

プロパティ値

型: System.Int32
コンテナーが実行に費やした時間を表す Integer です。時間は、ミリ秒単位で指定されます。

使用例

次のコード例では、pkg という名前のパッケージが作成済みであることを前提にしています。 このパッケージが実行され、この実行の開始時刻、停止時刻、および実行時間が記録されます。 情報をキャプチャするために、パッケージが実行された後で変数が作成されます。 DtsContainerIDTSExecutionMetrics インターフェイスを継承するため、pkg オブジェクトは、DtsContainer から継承する任意のコンテナー、タスク、またはオブジェクトに置換できます。

pkg.Execute();
DateTime dtStart = pkg.StartTime;
DateTime dtStop = pkg.StopTime;
int pgkDuration = pkg.ExecutionDuration;
pkg.Execute()
Dim dtStart As DateTime =  pkg.StartTime 
Dim dtStop As DateTime =  pkg.StopTime 
Dim pgkDuration As Integer =  pkg.ExecutionDuration

関連項目

参照

IDTSExecutionMetrics インターフェイス

Microsoft.SqlServer.Dts.Runtime 名前空間