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!

No comments:

The Database is not accessible after creating Always On Availability Group

 Having created a fully functional SQL Server Always On Availability Group, I connect using SSMS. Upon trying to expand the database, I get ...