#0219-SQL Server-SSMS for 2012-”Restore File Associations” Tools Option

Recently, I deployed Microsoft SQL Server 2012 on to one of my test workstations which already had SQL Server 2008 R2 installed on it. Later, I uninstalled SQL Server 2008 R2 from the workstation and suddenly, I noticed something strange – the SQL Server related script and solution files which were supposed to open up in SSMS failed to do so – the icon was set to a default “unknown program” too.

To re-associate these files with the SSMS, there are two possible options:

Option 1: Use the Control Panel to associate a program to a given file type

  1. Launch the Control Panel
  2. Go to Programs –> Default Programs
  3. Select “Associate a file type or protocol with a specific program”
  4. Scroll through the window and select the required file extension
  5. Choose “Change Program” and select the required program (in this case, SSMS) to associate it with the file type at hand

(*This method is valid for SQL Server 2012 and below).

Option 2: Use the SSMS to restore broken file associations related to Visual Studio shell

The SSMS is nothing but a Visual Studio shell. Hence, the SSMS for SQL Server 2012 extends the core benefits of Visual Studio 2010 shell. One such feature/benefit is the ability to Restore File Associations from the Tools menu.

  1. Within the SSMS for SQL Server 2012, go to Tools –> Options
  2. Under the General page in the Environment node, click on “Restore File Associations”
  3. image
  4. The following confirmatory message will be received, indicating that the file associations have been restored as expected
  5. image

(*This method is applicable from SQL 2012 only. SSMS for SQL Server 2008 R2 and below does not have this feature.)

(Please NOTE: For me, this did not work as expected when using the SSMS for SQL Server 2012 RTM. However, when I deployed SQL Server 2012 SP1, things worked as expected. Do share your findings in the comments below as applicable.)

Until we meet next time,

Be courteous. Drive responsibly.


Let me know what you think about this post by leaving your feedback here!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.