Server.Events Server.Events Server.Events Property


Gets the server events that are associated with the instance of SQL Server.

 property Microsoft::SqlServer::Management::Smo::ServerEvents ^ Events { Microsoft::SqlServer::Management::Smo::ServerEvents ^ get(); };
public Microsoft.SqlServer.Management.Smo.ServerEvents Events { get; }
Public ReadOnly Property Events As ServerEvents
Property Value

A ServerEvents object that represents the server events.



The Events property points to a ServerEvents object that controls the subscription to server events for the application to handle. Use the ServerEventSet object to create a variable that contains a specified set of server events, such as the CreateDatabase event. The server can then subscribe to the events by calling one of the SubscribeToEvents overloads. The StartEvents method then starts the server that is receiving events.

Applies to