SQL Server – SQL Scripts in TFS Without Putting Them into Solutions

sql serverteam-foundation-server

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?

Best Answer

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.