SQL SERVER – FIX : ERROR : Cannot find template file for new query (C:\Program Files\Microsoft SQL Server\90\Tools\ Binn\VSShell\Common7\ IDE\sqlworkbenchprojectitems\Sql\ SQLFile.sql)

Just a day ago while playing with SQL Server I suddenly faced new kind of error, which I have never seen before. This error happens when clicked on New Query on SQL Server Management Studio.

“Cannot find template file for new query (C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojectitems\Sql\SQLFile.sql) “

Fix/Workaround/Solution:
It was pretty new to me and I could not find any solution for this online. I had SQL Server installed on another machine as well. I copied SQLFile.sql from location mentioned above from another computer to my computer where error was happening. After this when I clicked on New Query it worked just like before.

You can download SQLFile.sql (Right Click and Download)from here and put it in the folder where SQL Server is installed. If you have installed SQL Server on default location you should put SQLFile.sql in the folder C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojectitems\Sql.

Reference : Pinal Dave (http://blog.SQLAuthority.com)

About these ads

12 thoughts on “SQL SERVER – FIX : ERROR : Cannot find template file for new query (C:\Program Files\Microsoft SQL Server\90\Tools\ Binn\VSShell\Common7\ IDE\sqlworkbenchprojectitems\Sql\ SQLFile.sql)

  1. When I am trying to acesess Comcash, I get an Application Error:
    The application has encountered the following error:
    (The application will attempt to recover from this error and continue once you press, ok) But it does not….
    SQL utilities has encountered a general error:
    Cannor open file C:\Program Files\Comcash8.0\SQLEditImages\Hot_ExportData.bmp

    Please help, this is real madening.

  2. hii….. u can also create a new sqlscript file..rename it as “SQLFile.sql” and paste it in that location…..it will work… This file might be deleted by clean up softwares like TuneUp Utilites…as its size is in bytes.

    • You are absolutely correct. It’s working. I just opened a procedure to modify and cleared the pan and saved it to
      C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojectitems\Sql
      with file name SQLFile.sql

  3. Thank’s brother! So, another question: I’d like convert all my tables, but there is a problem, I need convert a group of caracters, exemple:

    dbo.SA1010 to dbo.SA1099, there are 500 tables. You can see, just 3 last caracter.

    How can I do this?

  4. Thank you. I’ve been using my virtual machine’s SQL Server Express for this exact reason for several days by now. I did a search just now, found your page, and your solution works like a charm. I wish I search this immediately. Thank you. :)

Leave a Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s