Enable xp_cmdshell with sp_configure: turn on show advanced options, set xp_cmdshell to 1 and run RECONFIGURE. The full script is ready to run in SSMS.
Bitwise Flags: Test, Add and Toggle Individual Bits
Bitwise flags use AND to test, OR to add and XOR to toggle a mask. Keep flag meanings explicit and preserve missing values in read-only examples.
SQL SERVER – 2005 Take Off Line or Detach Database
To take off line a database in SQL Server 2005, use ALTER DATABASE SET OFFLINE with ROLLBACK AFTER 30 SECONDS or ROLLBACK IMMEDIATE instead of sp_dboption.
SQL SERVER – TRIM() Function – UDF TRIM()
SQL Server 2005 has LTRIM() and RTRIM() but no TRIM() function, so I wrote a simple UDF for SQL Server 2000 and 2005 that trims both sides. Video included.
SQL SERVER – Six Properties of Relational Tables
The six properties of relational tables explained: atomic values, values of the same kind, unique rows and more, with the benefit of each one.







