The safe way to change compatibility level in SQL Server 2005: single user mode, sp_dbcmptlevel, then multi user again, and how to check it.
SQL SERVER – Reclaim Space After Dropping Variable – Length Columns Using DBCC CLEANTABLE
Dropping a variable length column does not shrink the table. DBCC CLEANTABLE reclaims that space without an index rebuild. Example on AdventureWorks.
SQL SERVER – 2005 – Display Fragmentation Information of Data and Indexes of Database Table
How do you find Fragmentation Information for a table in SQL Server 2005? DBCC SHOWCONTIG has limits, so I use sys.dm_db_index_physical_stats instead.
SQL SERVER – Execute Same Query and Statement Multiple Times Using Command GO
Need to run the same statement several times without copy and paste? Put a number after the command GO, like GO 5, and SQL Server runs the batch that many times.
SQL SERVER – Export Data From SQL Server to Microsoft Excel Datasheet
How to export data from SQL Server to Microsoft Excel? Enable Ad Hoc Distributed Queries, create the Excel file, and run a short query to fill it.
SQL SERVER – 2005 – Introduction and Explanation to SYNONYM – Helpful T-SQL Feature for Developer
SQL Server 2005 added SYNONYM, a single-part name that replaces a long four part object name. I explain how it saves typing and shields code from changes.
SQL SERVER – Download Frequently Asked Generic Interview Questions
Readers wanted more on Frequently Asked Generic Interview Questions, so the list is now a download. There is no right answer, just answer what feels right.






