Enabled Property (SQL-DMO)

The Enabled property represents the enabled/disabled state of SQL Server Agent and replication objects.

Applies To
Alert Object JobSchedule Object
DistributionPublisher Object MergePublication Object
Job Object TransPublication Object
Operator Object Trigger Object
JobFilter Object  

Syntax

object.Enabled [= value]

Part Description
object Expression that evaluates to an object in the Applies To list
value True or False

Remarks

Setting the Enabled property enables or disables a SQL Server Agent or replication element. For example, setting the Enabled property of an Operator object to False disables a SQL Server Agent operator. A disabled operator will not receive notification when an alert is raised.

Setting the Enabled property of the JobFilter object restricts list output to the appropriate jobs when SQL Server Agent jobs are listed by using the EnumJobs method of the JobServer object.

Data Type

Boolean

Modifiable

Read-only for the DistributionPublisher object. Read/write for all other applicable objects.

Prototype (C/C++)

HRESULT GetEnabled(LPBOOL pRetVal);

HRESULT SetEnabled(BOOL NewValue);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.