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
Following query will run respective on today’s date. It will return Last Day of Previous Month, First Day of Current Month, Today, Last Day of Previous Month and First Day of Next Month respective to current month. Let us see how we can do this with the help of Date Function in SQL Server.
SQL SERVER – Index Optimization CheckList
Index optimization is always interesting subject to me. Every time I receive requests to help optimize query or query on any specific table. I always ask Jr.DBA to go over following list first before I take a look at it. Most of the time the Query Speed is optimized just following basic rules mentioned below. Once following checklist applied interesting optimization part begins which only experiment and experience can resolve.
SQL SERVER – DBCC Commands to Free SQL Server Memory Caches
Lots of people do not know that following command can be very helpful to clear your memory caches of SQL Server. I have often seen people restarting their entire system to clear the memory caches.
SQL SERVER – Enable Login – Disable Login using ALTER LOGIN – Change name of the ‘SA’
Enable Login – Disable Login using ALTER LOGIN – Change name of the ‘SA’