Sometimes it’s the small things that count.
I just noticed two small enhancements to SQL Server 2014′s BOL, and I can tell they are going to make my life easier.
How many times have you been developing a script, and you’re trying to make it work with multiple versions of SQL Server? Since I handle installations from 2005 – 2012, I do this a lot. And having to check all the previous versions for what columns are in a view, and which columns were added for which version, can be a real pain.
I was looking at the online version of SQL Server 2014′s BOL for sys.dm_db_file_space_usage. And two enhancements popped right out at me.
First, at the top of the table showing the columns returned by this view, is this little one line addition:
Hey… this instantly tells me what versions of SQL that this view is for. I don’t have to click the “Other Versions” link at the top of the page to see if this view is in any of the older versions. Nice.
Going along with this, if there are new columns in the view, I now see this in the chart of columns:
Okay, now this is, to me, just totally awesome. I can tell immediately which columns have been added to the view, and which versions that they are applicable to also. No more flipping back and forth between different SQL versions to determine what is different.
Compare this to the SQL 2012 BOL for the sys.dm_db_file_space_usage view, and you can see exactly what I mean.
As great as this is, there is still some work to be done. Just take a look at sys.databases. Here, we can see issues with the compatibility levels (really? Comaptibility levels 70/80/90 are for SQL Server 2008 and 2008R2?). And columns that were introduced in SQL 2008 (is_cdc_enabled, is_encrypted) don’t reflect that they were added in this version. Finally, the “Applies to” part that I first mentioned – it’s applicable to SQL 2005 also. BOL seems to be stuck at SQL 2008 being the oldest version.
My nitpicking aside, I think that this is a great improvement. I do have to wonder if there are plans to get it all cleaned up to be completely accurate, or to just start with a certain level. I also wonder how Microsoft is going to handle columns names that have changed from one version to another (while thankfully rare, this does happen on occasion).