Server.Events Property


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

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

No code example is currently available or this language may not be supported.

Property Value

Type: Microsoft.SqlServer.Management.Smo.ServerEvents

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.

Return to top