A friend needed to count Virtual Processors available to SQL Server 2000. Scripts for 2000 with xp_msver, and for 2005 to 2012 with sys.dm_os_sys_info.
Application Roles: Permissions That Follow the App, Not the User
Application roles sound like a lock only your app can open. This demo shows what the switch really does and why the password is the whole key.
Capturing Autogrowth Events With database_file_size_change
A data file grew over the weekend and nobody owns up. This small demo shows how one extended event tells autogrowth from a manual resize.
SQL SERVER – A Simple Puzzle and Simple Solution of Datatype and Computed Column
An interview riddle: create two columns but give a datatype only once, and copy data without UPDATE. A computed column solves it simply.
SQL SERVER – A Quick Script for Point in Time Recovery – Back Up and Restore
A quick script for point in time recovery: set up and back up a database, restore it to a point in time, then clean up. Three simple steps.
SQL SERVER – A Quick Trick about SQL Server CONCAT function
A quick trick from a Virtual Tech Days demo: adding a string to GETDATE() throws an error. CAST fixes it, and SQL Server 2012 CONCAT does it more simply.
EXISTS vs COUNT: The Right Way to Check If Rows Exist
Need a yes or no? Ask EXISTS. Need a number? Ask COUNT. Here is a small demo that shows why mixing them up can quietly give the wrong answer.






