locked
Template Explorer - Changing file location / Removing Defaults RRS feed

  • 질문

  • I have been unable to remove the default list of SQL Server Templates from management studio.  I don't really care about the ones already in there, but have hundreds of my own that i would rather be displayed.  I don't like searching through the 25 different folders that microsoft already has out there cluttering up my own folder structure, and would like to see them disapear, however after deleting them, they just come back next time i open up management studio.  Does anyone know how I can remove the default templates, or change the template location to point somewhere else so i don't see them in the explorer list anymore?

     

    Thanks in advance,

    Chris

    2006년 8월 17일 목요일 오후 4:59

답변

  • Management Studio was designed with multi-user environments in mind.  When SSMS starts, it checks a "common template folder" for templates and if any template is missing in a user's folder, it is copied from the common location.  This lets an administrator add a template to a common location and all the users on the machine will automatically get a copy when they start SSMS.

    If you want to permanently remove a template, first delete the file from ...\Documents and Settings\{user}\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\Templates\... (this removes the user's private copy), then remove the common template from %ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojectitems.  Once the common version has been removed, SSMS won't be able to copy it to the user's template directory during application startup.

     

    Hope this helps,
    Steve

    2006년 10월 13일 금요일 오후 6:07

모든 응답

  • Same exact problem here. Very aggravating. Strangely, if you create a new folder and drag the defaults into it, you will then find on reopening the folders are regenerated in the template explorer, but the scripts stay where you dragge dthem. Very odd.
    2006년 10월 7일 토요일 오후 11:48
  • Management Studio was designed with multi-user environments in mind.  When SSMS starts, it checks a "common template folder" for templates and if any template is missing in a user's folder, it is copied from the common location.  This lets an administrator add a template to a common location and all the users on the machine will automatically get a copy when they start SSMS.

    If you want to permanently remove a template, first delete the file from ...\Documents and Settings\{user}\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\Templates\... (this removes the user's private copy), then remove the common template from %ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojectitems.  Once the common version has been removed, SSMS won't be able to copy it to the user's template directory during application startup.

     

    Hope this helps,
    Steve

    2006년 10월 13일 금요일 오후 6:07
  • I will try that.  But it is very odd that they would design it that way, considering, in very few workplaces do developers share workstations.  So if they want code to be 'shared' amongst users you should be able to point it to a directory that all developers have access to, so everyone on the team is contributing to the directory.  Currently none of my templates are available to any other developer on my team, because no other developer is on my PC. 

    I guess I will have to write an application that pushes templates to the common directory of my team's PC's at login, or on reboot.  A lot of work considering we should just all be able to point it to a common location.

     

     

    2006년 10월 13일 금요일 오후 6:18
  • That's great feedback Chris.  I can see how being able to specify a network share for common templates would be useful.  Could you please file a comment on this topic at http://connect.microsoft.com/SQLServer?  The product team uses this kind of customer feedback to prioritize (or create) features in future versions.

    The thought going into the current design was that SQL Server is a server product and it's common in large companies to have multiple DBA's administering the same server (different shifts, etc.).  Obviously, this is a different environment than on a developer's workstation.  Another motivator was that if someone were to follow the security best practice of running on their workstation as a low privileged user, they couldn't install SSMS using that low privileged account and setup wouldn't know which user's folder should be used to store the template files.  If you install using an administrative account, then login as your normal user account, Management Studio needs to create the templates for the low privileged account.  The template copying mechanism takes care of this issue.

    Thanks,
    Steve

     

     

    2006년 10월 13일 금요일 오후 6:34
  • I have to say so far I'm really disappointed in SSMS I was hoping that it would be alot more "SQL Team" friendly. My current frustration is having the templates using a shared folder of "approved" templates.

    The more senior DBA's write tested and approved code snippets to do common functions and everyone in the team points to the one directory - this is so that we build upon solid foundations or we have a common library of work arounds for annoying data related problems.

    I would really appreciate someone pointing me to how I can refer SSMS to a remote directory. In Query Analyser it was simply a matter of pointing the templates directory to the common share - is there a similar option in SSMS?

    Thanks,

    George

    2006년 12월 18일 월요일 오전 3:55
  • I tried to change my common location by changing every reg entry that points to my local machines current common location.  This didn't seem to work, and my templates are still pulled from the initial common locaiton. My goal is to put our common locaiton on a network drive and have all templates pulled from there to the local location. This allows all developers to have templates that are current with our standards without having to push it out to each developer or worse assume the developer manually updates their templates with the network ones.

    Thanks,

    Bob

    2007년 1월 25일 목요일 오후 7:11
  • Hi:

    We have the same problem with SQL 2008 management studio.  We are unable to figure out how to share template amond DBA team and developer template among developers.   It was really easy with SQL 2000. 

    May we ask Microsoft to take this as a high priority request.  This may become a problem preventing us to buy and use Microsoft SQL 2008.  
    2009년 4월 17일 금요일 오후 1:05
  • Thank you, thank you. With a couple of minor changes in the paths this solution works wonderfully. I searched many other sites and documentation trying to find this answer.

    2009년 5월 5일 화요일 오후 9:01