SQL Server: Query Optimizer

Question: How does the query optimizer choose a plan for my SQL query? Answer: First, a disclaimer: Don’t perform these commands on any production or unit test server - EVER. These scripts are used for training; so DO NOT package them up and run them in production!...

read more

PowerShell: Create a Database Inventory

Question: How can I use Powershell to create an inventory of my databases? Answer: You can use SQL Server’s SMO structures to create an inventory of database objects. Once generated, you can output the result to the terminal in grid format, or others such as CSV or...

read more