Source Controll in different Environments (Subversion)

  • MDave

    SSC Eights!

    Points: 953

    Hello together,

    we are thinking about using a source control system (like Subversion) for our database development ( Views, SPs, and DML Scripts).

    We have 3 different environments, Test, Quality and Production.

    What i don't understand:

    1. How to handle these environments, should all objects from all environments be scripted out into source control system?

    2. What about the deployment of DML Scripts? As far as i know only the schema is stored in source controll, how to handle data changes?

    3. What about deployment packages, how can i find out which objects have been changed by deployment 32?

    4. How to ensure that verison numbers in different environments match? For example i have 4 versiona of object X(V.1.4) in TEST because i had to make several changes but only the latest version will come to quality, so it will have the number V.1.1. So i could have always different version numbers for each environment (not goof).

    Thanks a lot!

  • dean gross

    SSCrazy

    Points: 2632

    any luck getting this figured out? I am trying to do something similar and have many of the same questions.

    Dean

  • spaghettidba

    SSC Guru

    Points: 105673

    RedGate is about to release a new product, SQL Source Control, that may help you address all of those issues.

  • sebastiaan.pouyet

    Newbie

    Points: 4

    Check out dbsourcetools at codeplex:

    http://dbsourcetools.codeplex.com/

    Project description: "DBSourceTools is a GUI utility to help developers bring SQL Server databases under source control. A powerful database scripter, code editor, sql generator, and database versioning tool. Compare Schemas, create diff scripts, edit T-SQL with ease. Better than Management Studio." Also it's open source (GPLv2).

    If I'm not mistaken dbsourcetools scripts objects from and to the database, these are saved on disk in a projects folder. This folder can be versioned with a VCS. I've used Mercurial in combination with the TortoiseHg GUI on Windows. It's very intuitive and easy to use. Git is fantastic too.

    VCS comparison here: http://versioncontrolblog.com/comparison/Bazaar/CVS/Git/Mercurial/Subversion/index.html

    Cheers,

    Sebastiaan

  • pedro.alexandre.vieira

    Newbie

    Points: 1

    Hello,

    Check if this suits you: use Visual Studio 2008 Database Projects to maintain your database objects in files (which you can add to SVN). Script all your three environments to three different projects. Use a Merge tool to merge the differences between files when you want to "move" your changes from Test to other environments. Use the Visual Studio 2008 utility to compare your script files with the objects in the database and generate a deployment script: Schema Compare. Add the deployment scripts to SVN.

    We are trying to put this to work also. Let me know if you achieve your goal.

    Best regards,

    Pedro Vieira

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

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