.SQL Files launch a new instance of SQL Server Management Studio instead of opening a new query window (Windows 7)

I had an issue where doubleclicking on a .SQL file always launched a new instance of SSMS instead of just creating a new query window. Needless to say, it was a bit annoying. Usually, you would fix this by deleting and recreating the file association. Well, thanks to Microsoft’s wonderful engineers, Windows Vista and 7 users don’t have the ability to delete a file association.

After some experimentation and research, I found a simple fix. If you execute the following registry edit, you should be okay (it worked for me).

[HKEY_CLASSES_ROOT\.sql]
"PerceivedType"="text"
@="sqlwb.sql.9.0"

Leave a Reply