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 system stored procedures to get the status of current processes:
sp_who
sp_who2
The following is the prerequisite for this recipe:
An instance of SQL Server 2012 Developer or Enterprise Evaluation edition.
How to do it...
Follow the steps provided...