Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In addition to the WMI Provider for Configuration Management discussed in Chapter 9, SQL Server 2008 includes one other WMI provider: the WMI Provider for Server Events. This provider transforms SQL Server event data into WMI class instances, and enables you to use WMI to monitor events in SQL Server. This chapter shows you how to monitor Data Definition Language (DDL) and trace events in a SQL Server instance by leveraging this provider in Windows PowerShell. This chapter covers the following:
WMI Provider for Server Events
WMI Query Language (WQL)
Event handling with Windows PowerShell 2.0
Monitoring errors from the SQL Server error log
Monitoring deadlocks
Monitoring blockings
Monitoring login changes and failed login attempts
Monitoring databases and database objects