My students got Msg 262, SHOWPLAN permission denied, when they tried to view an execution plan. One GRANT SHOWPLAN statement fixes it.
SQL SERVER – Find Location of Data File Using T-SQL
A short T-SQL script that finds where your SQL Server Data File folder is on disk, using master.sys.master_files. Handy when you forget where the files live.
SQL SERVER – Get Date of All Weekdays or Weekends of the Year
Tejas Shah’s easy script to list the date of all weekdays or weekends of a year with a recursive CTE, first written to find every Sunday of 2010.
SQL SERVER – Difference Temp Table and Table Variable – Effect of Transaction
Temp table versus table variable, part two: a transaction rollback undoes changes to a temp table, but a table variable keeps its values.







