Monthly Archives: March 2011

MS SQL Server: Quick T-SQL to Delete All User Table Data

Here’s a quick (hack) way to delete all user table data from a Microsoft SQL Server database using the undocumented procedure sp_MSforeachtable. As the name hints, this procedure repeats a SQL statement against all user tables within a database. This … Continue reading

Posted in MS SQL Server, T-SQL | Leave a comment

IT Toolbox: TechNet Magazine March 2011

The March IT Toolbox column is up on the TechNet Magazine website. This month I covered these two tools: Fast Duplicate File Finder: Get rid of all those duplicates on your NAS PowerGREP: Search your filesystem fast Check it out … Continue reading

Posted in Microsoft TechNet | Leave a comment

Creating a SQL CLR User Defined Function

Starting with SQL Server 2005, Microsoft added the awesome ability to reference .Net assemblies from your T-SQL procedures.  Here’s a quick 5 step overview on how to get up and running with your code-based User Defined Function. 1) Create a … Continue reading

Posted in C#, MS SQL Server, T-SQL | Leave a comment

Windows 7 and Server 2008 R2: Make SP1 Permanent

If you are pretty sure you aren’t going to be rolling back Service Pack 1 on your Windows Server 2008 R2 or Windows 7 machine, you can free up some space by making it permanent.  This will remove all the … Continue reading

Posted in Windows 7, Windows Server 2008 R2 | Leave a comment