A client with five replicas said adding a new database to their AlwaysOn Replica setup was slow. Here is what we found while the issue was happening.
SQL SERVER – How to Remove TempDB File?
A DBA accidentally added an extra TempDB file and was not allowed to use SSMS to undo it. Here is how to remove a TempDB file with T-SQL only.
Mirrored Database: Move Files Without Breaking Mirroring
To move the files of a mirrored database, change the file paths on the principal with ALTER DATABASE, stop both instances, move the files, and start them again in the right order. This post tests the T-SQL steps on a demo database and describes the mirroring steps from the documented behavior. It also covers what to check afterward.
CPU-Bound Queries: Comparing worker_time to elapsed_time
Is a slow query working or waiting? Compare its two clocks and you will know what to fix before anyone buys more CPU.
Pareto Analysis in T-SQL: Which Products Make 80 Percent of Sales
Build Pareto analysis in T-SQL with product totals, stable running sums, and explicit ABC thresholds that handle ties and boundary choices.
What are Forwarded Records in SQL Server? – Interview Question of the Week #145
What are forwarded records in SQL Server? It is an old concept, yet few new DBAs know it. Here is a short answer about heap rows that moved to a new page.







