A lot of DBAs including me used sp_depends several times to analyse stored procedures. I felt helpless when I understood, sp_depends is not always dependable.…
If we perform update or delete operation on huge number of rows in a large table at once, there are chances that the SQL Server…
Its quite common that when there is some upgrade, change or release in application, there are chances that our database objects get modified. It may…
There are several ways to configure and start monitoring page splits on SQL Server. But now in 2012, we could make use of extended events…
What are differences between a latch and a lock? What are the different states of an spid in SQL Server? Explain each state. What are…
Problem A few months back, I had shared a script to automate index rebuild/reorg in a database with fragmentation analysis inplace at https://www.sherbaz.com/2013/06/resumable-auto-index-rebuild-and-reorganize-script/. But that…
One fine morning, users started complaining my SQL server instance performance…They sent me a screenshot which indirectly says, their queries have timed out. I quickly logged…
SELECT v.[id], d.dirname, Count(v.[version]) MaxNumberOfVersions, Sum(v.[size]) TotalDocLibSize, Max(v.[size]) LargestDocSize FROM [dbo].[alldocversions] v JOIN [dbo].alldocs d ON v.id = d.id GROUP BY v.id, d.dirname ORDER BY 4 DESC
As part of SQL server database maintenance, the indexes have to be defragmented on regular basis by rebuild or reorganize for consistant performance. Most of…
Problem Detaching a database with drop all connections enabled was running continuously without completing. When checked what was causing the block or lock, I found…