Fix : Error 1205 : Transaction (Process ID) was deadlocked on resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
SQL SERVER – Query to Find First and Last Day of Current Month – Date Function
One query to find the First and Last Day of Current Month in SQL Server, plus the last day of the previous month and the first day of the next.
SQL SERVER – Index Optimization CheckList
My Index Optimization checklist for Jr. DBAs: index columns used in WHERE, ORDER BY, GROUP BY and JOINs, drop indexes you do not need and keep keys small.
What Is a Heap in SQL Server?
A heap in SQL Server is a table with no clustered index. Forwarded records pushed one count from 11,113 reads to 199,844, and a single REBUILD put it back. When a heap is fine and when it is not.
SQL SERVER – DBCC Commands to Free SQL Server Memory Caches
You do not need to restart the server to clear SQL Server memory caches. DBCC FREESYSTEMCACHE and related DBCC commands do it, for the rare times you need it.





