SQL SERVER – Behind the Scene of SQL Server Activity of – Transaction Log – Shrinking Log

Imran Mohammed continues to help community of SQL Server with his very enthusiastic writing and deep understanding of SQL Server architecture. Let us read what Imran has to say about how Transaction Log works and Shrinking of Log works. Question from lauraV Please help me understand. I am taking a…
Read More

SQL SERVER – 2005 – A Simple Way To Defragment All Indexes In A Database That Is Fragmented Above A Declared Threshold

Just a day ago, I received email from regular reader Rajiv Kayasthy about a script which demonstrates the A Simple Way To Defragment All Indexes In A Database That Is Fragmented Above A Declared Threshold. He found this script on TechNet BOL and was attempting to run on SQL Server…
Read More

SQL SERVER – Msg: 2593 : There are ROWCOUNT rows in PAGECOUNT pages for object ‘OBJECT’.

There are ROWCOUNT rows in PAGECOUNT pages for object ‘OBJECT’.

This message is displayed when DBCC command is ran for any database. It is harmless and displayed for information purpose only. For each database DBCC commands displays number of rows and number of pages it is using. DBCC CHECKALLOC is exception for this messages.

Read More

SQL SERVER – Reclaim Space After Dropping Variable – Length Columns Using DBCC CLEANTABLE

All DBA and Developers must have observed when any variable length column is dropped from table, it does not reduce the size of table. Table size stays the same till Indexes are reorganized or rebuild. There is also DBCC command DBCC CLEANTABLE, which can be used to reclaim any space previously occupied with variable length columns. Variable length columns include varchar, nvarchar, varchar(max), nvarchar(max), varbinary, varbinary(max), text, ntext, image, sql_variant, and xml. Space can be reclaimed when variable length column is also modified to lesser length.

Read More