A simpler way to convert a hexadecimal string to varbinary

This isn’t perf-related like most of my earlier posts, but I thought it was useful enough that I should share it.  We recently had a situation where we had to convert a hexadecimal string representation of a binary value to a true binary (e.g. varchar value ‘0x1234abcdef’ –> varbinary 0x1234ABCDEF).  There’s a built-in function in SQL (fn_varbintohexstr) to…

2

Are you using SQL’s Missing Index DMVs?

Did you know that your SQL Server is keeping track of the indexes that it thinks you should create?  The “missing index” DMVs in SQL are a really great new feature in SQL Server 2005 that (in my opinion) seem to have been underutilized so far.  If you want to see if this feature can spare you…

29