Templates and teamwork

  • Comments posted to this topic are about the item Templates and teamwork

  • Are there any plans to be able to specify a team repository for templates in SS 2008?

    We had to implement a similar solution as outlined in the article which works fine but it would be great to not have to run a batch script.

    -- JP

  • Looks like the editor "ate" most of your code blocks. 🙁

    What does the XCOPY command look like?

  • I always wanted to share my code snippets and templates. Really nice idea. Thanks.

    Pedro R. Lopez
    http://madurosfritos.blogspot.com/[/url]

  • CAGreensfelder (5/20/2008)


    Looks like the editor "ate" most of your code blocks. 🙁

    What does the XCOPY command look like?

    What browser are you using? In FireFox the code block gets a scrolling window.

  • I'm using IE7 on WinXP Pro 2002 SP2, all patches applied. Over half the code blocks in this article come up as a horizontal scroll bar only - no vertical. This happens occasionally. Guess I should report it to webmaster when it happens. They can't fix it if no one tell 'em it's broke.

    I looked at the page source and found the bits I was interested in.

    We use SQLMS with Visual SourceSafe. We've got 3 developers each working with thier own local dev SQL server. We wrote templates for the CRUD stored procedures and a few other tools with our shop headers and standard error handling.

    We have separate SQLSM projects for different areas of the application in the SQLMS solution and we included a project for the templates. But rolling out the templates to the actual template folder has been a pain - that's one LONG path. (We finally stuck a text file in the Templates project with the template file path name so we could remember it. It shows up in the Misc folder in the project)

    Now I've got a batch file in the project to XCOPY the templates. Much easier to just double-click the batch and let it remember where the templates go.

  • Good article..........

  • Good article. I have used the templates, but I like your method of getting team templates distributed.

    CAGreensfelder - I have a similar setup as you and the code blocks don't show right either. I've found you can highlight the block, copy it and paste into something like notepad. The text will show up then. It seems to happen when there is just one line in the block.

    Ian.

    "If you are going through hell, keep going."
    -- Winston Churchill

  • You can customize your templates by following the following advice. Using this method you would be able to get rid of the unused templates and create new ones suitable to your profession that can be shared.

    Steven Twitchel from MSFT wrote in another forum on October 13, 2006

    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.

    This works in SSMS 2008 using:

    \Documents and Settings\{username}\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\Templates\Sql – for the private copy

    %Program Files%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql – for the common version

  • Do you have a link to the article? I'm not finding anything on my searches.

  • Found it. (It was "Twitchell" with a double "L" at the end.)

    Nope, that doesn't help. It refers to an alternate location on my same machine, not a remote location on a network share. We don't have multiple users on one machine as a rule. We each have our own.

    I want the little monsters to sit out on the network so if anyone in my group changes one, SSMS propagates from the change template on the net to my local template repository.

    Guess we're stuck periodically emailing everyone an updated template and telling them to put it on their machine.

  • Whoops, dropped an l at the end of his last name.

    http://social.technet.microsoft.com/Forums/ko-KR/sqltools/thread/4013c8de-c39b-437a-b447-3d5f1fee84ea

    I also found that you need to change the tql extension to sql and your templates will be visible and then everything will work great.

  • Is there any way to have a placeholder for the generated date?

    -- Author:<Author,,Rémi Grégoire>

    -- Create date: <Create Date,,GetDate()>

    -- Description:<Procedure_Name, sysname, ProcedureName>

    I want the getDate() to be replaced by '2010-01-15' when I replace the template variables.

    TIA.

  • To collect the SQL snippets I use a service called Snip2Code, which is also integrated into Visual Studio as an extension.

    This way, I'm able to share my snippets with my team and reach them on all the servers with an Internet connection. So I'm not linked to a particular installation of SQL Managemenet Studio or similar.

    Try it:

    http://www.snip2code.com

  • This is an interesting discussion. We wind up using a wiki for shared scripts where I work.

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic. Login to reply