After the first SQLSaturday in Sri Lanka, here is a question worth a script: how many lines of code do you have in your database? Here is a way to count them.
Who Changed This Row? Auditing Data Changes
Auditing data changes requires choosing whether you need old values, new values, actor identity, or a change feed, then testing the cost.
SQL SERVER – Puzzle with Year Function
After my MONTH() contest, here is a puzzle with YEAR function: what do MONTH and YEAR return for the date 0001-1-1, and why? Take a guess first.
SQL SERVER – Identify Disk Latency on SQL Server Box Using PowerShell
Disks are often behind a slow server, and the problem can be hard to spot. Here is a PowerShell script to identify Disk Latency on your SQL Server box.
SQL SERVER – Adding Reference Data to Master Data Services – Notes from the Field #081
Reeves Smith shows how to add reference data to Master Data Services with the MDS add-in for Excel, so the business can manage it themselves.
MONTH, DATEPART and DATENAME: Getting Month Names and Numbers Right
Use DATENAME for month labels, compare MONTH and DATEPART, control language and culture, and group sales without combining different years.






