A quick script to check database integrity for all the databases on a server with DBCC CHECKDB and sp_msforeachdb, and how to read its output.
SQL SERVER – Refresh Database Using T-SQL
Can you refresh database in Object Explorer using a T-SQL query? No. But if cached objects changed, DBCC commands can clear the cache for you.
SQL SERVER – 2008 – Interview Questions and Answers Part 8
SQL Server 2008 Interview Questions and Answers Part 8 starts with Data Compression: how row compression and page compression work and save space.
SQL SERVER – Behind the Scene of SQL Server Activity of – Transaction Log – Shrinking Log
Why does an LDF file keep growing even with hourly log backups? Imran Mohammed explains what goes on behind the scene of the Transaction Log and shrinking.
SQL SERVER – DBCC SHRINKFILE Takes Long Time to Run
Why does DBCC SHRINKFILE take so long when index rebuilds run faster? It is single threaded. Rebuild indexes first and the shrink takes less time.
SQL SERVER – Clear SQL Server Memory Caches
Need to clear SQL Server memory caches on a production server you cannot restart? Three DBCC commands free up memory by cleaning the cache.
SQL SERVER – Find Current Identity of Table
Many developers use MAX() to find the current identity of a table. I prefer DBCC CHECKIDENT, which reports the current identity value directly.






