Właściwość ScriptingOptions.AgentAlertJob
Pobiera lub ustawia Boolean właściwość określa czy dołączać SQL Server Nazwa zadanie agenta dla alert obiektów script.
Przestrzeń nazw: Microsoft.SqlServer.Management.Smo
Zestaw: Microsoft.SqlServer.Smo (w Microsoft.SqlServer.Smo.dll)
Składnia
'Deklaracja
Public Property AgentAlertJob As Boolean
Get
Set
'Użycie
Dim instance As ScriptingOptions
Dim value As Boolean
value = instance.AgentAlertJob
instance.AgentAlertJob = value
public bool AgentAlertJob { get; set; }
public:
property bool AgentAlertJob {
bool get ();
void set (bool value);
}
member AgentAlertJob : bool with get, set
function get AgentAlertJob () : boolean
function set AgentAlertJob (value : boolean)
Wartość właściwości
Typ: System.Boolean
A Boolean wartość Określa czy dołączać SQL Server Agent alerty i zadania.
Jeśli True, alerty i zadania są przetwarzane przez skrypty.W przeciwnym razie False (domyślnie).
Przykłady
Poniższy przykład kodu Określa, że będzie ładowanie alerty i zadania.
Visual Basic
Dim scOps As New ScriptingOptions()
scOps.AgentAlertJob = true
PowerShell
$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.AgentAlertJob = $TRUE
Zobacz także