Monitoring with system stored procedure

SQL Server provides a few system stored procedures that can be used to monitor SQL Server by getting details on current processes, sessions, requests, locking information, and so on. In this recipe, you will see how you can use some system stored procedures to monitor current SQL Server processes, sessions, requests, and blocking information.

If you suddenly experience that database requests coming from applications are not being served normally and applications have to wait normally for database responses, you may want to do a quick check to see whether the requests are blocked by other requests or whether the processes are getting suspended very frequently.

Getting ready

In this example, we will use following ...

Get Microsoft SQL Server 2012 Performance Tuning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.