Management Studio: Error opening read-only SQL Template

We have custom SQL boiler plate templates for our dev group. We store in a version control library. When we open one of the templates from SSMS, we get the error below. The template still opens and we can work and save as something else, which is what we want. However, this exception is thrown everytime.

It is a nuisance. Is this a bug that will be fixed

TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to open template. (AppIDPackage)

------------------------------
ADDITIONAL INFORMATION:

Failed to open C:\Documents and Settings\MyUser\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\Templates\Sql\Our Templates\CreateFunctionMultiStatementTableValued.sql template.

------------------------------

Access to the path 'C:\Documents and Settings\MyUser\Local Settings\Temp\CreateFunctionMultiStatementTableValued1.sql' is denied. (mscorlib)

------------------------------
BUTTONS:

OK
------------------------------



Answer this question

Management Studio: Error opening read-only SQL Template

  • Wlodek Loboz

    This is what looks like is happening. Since you have the templates under source control they are attributes as Read-only on your local system - as any good source control system would do. For some reason - I didn't look at the code - when Management Studio opens a template file it expects to have write access to it even though it doesn't appear to need it.

    If you want to avoid the error you can reset the read-only attribute on your template files. But this will "violate" the source control setting.

    I suggest you submit this bug through the product feedback center: http://lab.msdn.microsoft.com/ProductFeedback

    Cheers,
    Dan



  • Seefer

    Thanks for your input. I will post this bug through the feedback center you listed.

    Cheers,

    Sue


  • Management Studio: Error opening read-only SQL Template