5

I am using SSMS 2012. I am working with .PRC, .TAB, and .UDF files. I added these file extensions to SSMS so that it would treat them like .SQL files already via Tools > Options > Text Editor > File Extension, but recently SSMS has stopped recognizing these files (e.g. won't show them with color coding or allow me to run them against a database). Funnily enough when I remove a file extension from a file it then recognizes them because it has "Map extensionless files to SQL Query Editor" checked.

Does anyone know what the problem might be?

Aaron Bertrand
  • 181,950
  • 28
  • 405
  • 624
tuseau
  • 1,895
  • 5
  • 18
  • 18

2 Answers2

2

According to this Connect item, this bug was fixed in Service Pack 1.

However, if the issue persists, you can try this convoluted workaround posted over at SQLServerCentral by Marios Philippopoulos:

OK, got it to work with help from http://www.progtown.com/topic374931-sql-server-2012-rtm.html.

Opened regedit.exe as Administrator.

Then:

On [HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0\FileExtensionMapping\PRC] I changed the Default key value to {B5A506EB-11BE-4782-9A18-21265C2CA0B4}.

On [HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0\Default Editors\PRC] I changed the Custom key value to {B5A506EB-11BE-4782-9A18-21265C2CA0B4}.

Aaron Bertrand
  • 181,950
  • 28
  • 405
  • 624
0

For me who had just the same problem, the easiest solution was to add the extensions I wanted (PRC,TAB,TRG,UDF) and mark them against SQL Query Editor as you can see on the picture below.

With that done I have the .tab files having the same treatment as the .sql ones.

There was no need to fiddle with the regedit. enter image description here

I am on SSMS v18.12.1

enter image description here

Marcello Miorelli
  • 17,274
  • 53
  • 180
  • 320