I am working on adding existing SQL scripts to version control. I have Team Foundation Server 2012 set up with Visual Studio 2008 and SQL Server Management Studio 2008 R2 with the MSSCCI. I am fairly new to TFS so I do not know if I am missing an easier way of doing things.

Managing SSIS projects and even SSRS projects makes perfect sense with TFS, as a project is needed to use or modify it in Visual Studio/BIDS. You add the project to source control then check in much like saving a solution/project normally on your local machine.

SQL scripts seem a little more cumbersome to use with TFS. It seems like I have to create SQL Server solutions to add any sort of sql script to my source control from SQL Server Management Studio (the add to source control functionality). While I can create new solutions in SSMS and add them to source control quite easily, it is a little annoying to have to add all of my existing scripts, which are simply .sql files, to new solutions.

Ideally I would like some way to just add the scripts to source control, be able to modify them in SSMS, then check them back in somewhat easily. If this were subversion, I could just commit and check in the single file in Windows Explorer and be done with it, managing and modifying the file however I want. Is there an equivalent in TFS to this?

  • Are your scripts saved as files? – JeffO Jul 21 '14 at 20:40
  • They are saved as .sql files. I found a semi-solution, which is the TFS power tools which allows me to save anything to tfs, then check it out in the windows explorer. – Dangus Jul 22 '14 at 15:39

With TFS Power Tools, you can access your repository (do commits, add files to the repository, etc.) directly from Windows Explorer, just like you do with TortoiseSVN.

Then, you can add any file you want to TFS without adding it to the solution.

  • I found this a few days after asking this question. Definitely a nice addition to working with TFS, does pretty much what i was expecting with source control. Marked as answer, thanks! – Dangus Aug 4 '14 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.