次の方法で共有


CommandExecutionSuccessCode プロパティ

ジョブ ステップとして実行されたコマンド シェル プロセスから、プロセス終了コードを取得します。値の設定も可能です。

名前空間:  Microsoft.SqlServer.Management.Smo.Agent
アセンブリ:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)

構文

'宣言
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property CommandExecutionSuccessCode As Integer
    Get
    Set
'使用
Dim instance As JobStep
Dim value As Integer

value = instance.CommandExecutionSuccessCode

instance.CommandExecutionSuccessCode = value
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public int CommandExecutionSuccessCode { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property int CommandExecutionSuccessCode {
    int get ();
    void set (int value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member CommandExecutionSuccessCode : int with get, set
function get CommandExecutionSuccessCode () : int
function set CommandExecutionSuccessCode (value : int)

プロパティ値

型: System. . :: . .Int32
コマンド実行の成功コードを示す Int32 値です。0 は成功、1 は失敗を表します。

説明

コマンド シェル プロセスを実行するジョブ ステップの成否は、プロセス終了コードで判断されます。ジョブ ステップの成否に基づいてロジックと通知を有効にするには、CommandExecutionSuccessCode プロパティに、コマンド シェル プロセスが成功した場合のリターン コードを設定します。