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)

SQL
12 Comments

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) warning Just a day ago while playing with SQL Server I suddenly faced a new kind of error, which I have never seen before. This error happens when clicked on New Query in SQL Server Management Studio. Let us learn in this blog post how we will fix the error – cannot find template file for a new query.

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

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) templatefile

Solarwinds

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 the location mentioned above from another computer to my computer where the error was happening. After this when I clicked on New Query it worked just like before.

You can download SQLFile.sql 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.

Well, that’s it. This is how we can solve the problem. I am indeed very delighted that I ended on the on this error so I can blog about it. Please leave a comment.

Reference : Pinal Dave (https://blog.sqlauthority.com)

Solarwinds
, ,
Previous Post
SQL SERVER – Find All The User Defined Functions (UDF) in a Database
Next Post
SQL SERVER – Simple Example of WHILE Loop with BREAK and CONTINUE

Related Posts

12 Comments. Leave new

  • 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.

    Reply
  • Pinal,

    The link for downloading SQLFile.sql is broken. Is there somewhere else I can get this file? Thanks.

    Keith Pool

    Reply
  • please give me the file(SQLFile.sql) which is not working above it will be very thankfull

    Reply
  • 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.

    Reply
    • 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

      Reply
  • It worked thank so much!!

    Reply
  • your link is broken ,can you give me the right link….i am in great trouble.thanks

    Reply
  • 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?

    Reply
  • 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. :)

    Reply
  • Now I can solve my problem. Thank you :)

    Reply
  • doc. Thanks you !!!

    Reply
  • thanks you

    Reply

Leave a Reply

Menu