TSQL Scripts for Troubleshooting Common Issues with SQL Server


This blog provides TSQL samples for troubleshooting common SQL Server issues as listed below. You can modify the parameters (i.e. database name, table name, keyword name, duration, etc.) based on customized environment settings and requirements. (Test these scripts before implementing in PROD environment. Please be aware of all potential risks for implementing the script in your PROD environment.)

 

1. Performance Troubleshooting(blocking, high CPU, memory, idle, query execution)

2. Deadlock and Database Object ID mapping

3. HA (Clustered SQL Server)

4. Backup & Transaction Log Related Issue

5. Query Store (QDS)

6. Database Encryption (TDE)

7. Tool (Profiler trace and X-event)