Stored proc source code control? RRS feed

  • Question

  • Can  TFS 2010\ 2012 extract stored procs from a databse into source control? (Or is that still the domain of third-party tools?)



    Monday, March 12, 2012 3:55 PM


All replies

  • Yes,

    You need to look for SQL database projectvs.

    You can create a new sql database project in visual studio by file new project, sql => Sql 2005, 2008 (project type is dependant on the version of sql database you are using).

    Right click the database project and chose generate from database, a wizard (yes wizards are good) will show up asking for the sql server identify you want to point to, by feeding in the details you have the option to absorb the entire schema (tables, views, stored procs) into the database project. Here on you can source control the database and manage the database deployments. What's even more beautiful is that the TFS build process easily integrates with the database deployment engine to allow you to deploy your database as part of your ci builds.


    Cheers, TArun

    Please remember to mark the replies as answers if they help.

    Tarun Arora

    Blog: http://geekswithblogs.net/TarunArora  Subscribe in a reader

    Monday, March 12, 2012 11:12 PM
  • Hi Barkingdog,

    Thanks for your post.

    For this issue, Tarun provided us the detailed explanation, please confirm it. 

    If misunderstood anything, please describe your question in more detail and we will be able to provide the better responses.

    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, March 13, 2012 10:11 AM
  • Tarun,

    Our developers use VS.NET 2010 Pro against Sql 2005, Sql 2008 Std edition.  Is the option you describe available to them or only for users of, say, VS Ultimate?



    Tuesday, March 13, 2012 2:10 PM
  • Hi Barkingdog,

    Thanks for your reply.

    As far as I know, the VS 2010 Professional support the Database Development feature too. Please refer to this: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/product-comparison.   

    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by edm2 Wednesday, March 14, 2012 2:13 PM
    Wednesday, March 14, 2012 6:47 AM