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


Yesterday I wrote article about SQL SERVER – 2005 – Last Ran Query – Recently Ran Query. I had used CROSS APPLY in the query. I got email from one reader asking what is CROSS APPLY. In simpler words, cross apply is like inner join to table valued function which can take parameters. This particular operation is not possible to do using regular JOIN syntax You can see example of CROSS APPLY in my article here.

Read More

SQL SERVER – Fix : Error 15281 SQL Server blocked access to STATEMENT OpenRowset/OpenDatasource of

Error 15281
Msg 15281, Level 16, State 1, Line 3
SQL Server blocked access to STATEMENT ‘OpenRowset/OpenDatasource’ of component ‘Ad Hoc Distributed Queries’ because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘Ad Hoc Distributed Queries’ by using sp_configure. For more information about enabling ‘Ad Hoc Distributed Queries’, see “Surface Area Configuration” in SQL Server Books Online.

Read More

SQL SERVER – Difference Between Quality Assurance and Quality Control – QA vs QC

Regular readers of this blog are aware of my current outsourcing assignment. I am managing very large outsourcing project in India. One thing is very special in all Indian offices are “Tea Time.” Everybody wants to attend Tea Time not only for tea or coffee but for the interesting discussion occurs at that time. This is the time when all the department employees are together and discussing whatever they wish.Today there was an interesting discussion about Quality Assurance (QA) and Quality Control (QC).

Read More

SQL SERVER – T-SQL Script to Find Details About TempDB Information

Two days ago I wrote an article about SQL SERVER – TempDB Restrictions – Temp Database Restrictions. Since then I have received few emails asking details about Temp DB. I use following T-SQL Script to know details about my TempDB. This script is a pretty old script but it does work great most of the time. I strongly encourage all of you to use a script to check your TempDB Information.

Read More
Exit mobile version