次の方法で共有


AgentNotify プロパティ

SQL Server エージェントの警告の通知をスクリプトに含めるかどうかを示す Boolean プロパティを取得します。値の設定も可能です。

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

構文

'宣言
Public Property AgentNotify As Boolean
    Get
    Set
'使用
Dim instance As ScriptingOptions
Dim value As Boolean

value = instance.AgentNotify

instance.AgentNotify = value
public bool AgentNotify { get; set; }
public:
property bool AgentNotify {
    bool get ();
    void set (bool value);
}
member AgentNotify : bool with get, set
function get AgentNotify () : boolean
function set AgentNotify (value : boolean)

プロパティ値

型: System. . :: . .Boolean
SQL Server エージェントの警告の通知をスクリプトに含めるかどうかを示す Boolean 値です。
True の場合、SQL Server エージェントの警告の通知がスクリプトに含まれます。False (既定値) の場合、警告トークンは置き換えられません。

使用例

次のコード例では、エージェントの警告の通知をスクリプトに含めるように指定します。

Visual Basic

Dim scOps As New ScriptingOptions()
scOps.AgentNotify = true

PowerShell

$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.AgentNotify = $TRUE