Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

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)

public ServerEvents Events { get; }

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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft