Wednesday, February 05, 2014

Opening files in SSMS as query files when they don't have .sql as extension

SSMS (SQL Server Management Studio) will happily load a *.sql file and execute it as a SQL Script.
However, we store our DDL files as .DDL.

I was able to convince SSMS to treat these as sql scripts in the following way:

Tools -> Options
Expand Text Editor
Select File Extension
Add an extension.  NOTE: Make sure to select "SQL Query Editor" in the "Editor" drop-down.














And, voila!

Get Restart log using PowerShell

I'm often curious about a restart on a Windows server system. An easy way to get a list of the restart and what initiated it is to use t...