Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Uday Reddy,
Do you ever get an alert for high cpu, but by the time you login/check the server cpu is back to normal?
If yes, then use this sp to create a sql agent job and run it every min.
With this job running, you can login to the server and check the queries and jobs that were running when cpu was high.
High cpu issues might be outside of sql server queries but I assume production SQL Server won't host any other processes / services.
I used the tsql query for cpu from this post
SQL Server LInk Server Query
dynamic linked server query
Linked Server Query
what is cross server query
Cognos Query In SQL server