Tutorial :How do I start to use Version control / Share code in SQL 2005?



Question:

I manage a small team of developers who up till recently have all been working on independent projects.

We have now all come together to work on one holistic project and its really tough. People are changing things, without consulting other programmers and its very difficult to manage.

We are also working in a pure production environment (no test/production)

I am a bit lost on where to start, I am looking at products like Team Foundation Server or their is a product by Red gate called "Source control"

Does anyone know any good books on the above subject, I cannot be the only person in this situation? :)


Solution:1

Source Code:

If you're looking for how to use source control (versus how to get your team to a controlled source environment) you should check out Source Control HOWTO by Eric Sink. The disclaimer here is that he has written a source control product but the HOWTO isn't specifically tailored to it.

Database Schema:

If you're looking for how to get your database (structure not data) in source control (since it was mentioned in the title) then you should check out this Coding Horror post: Get your database under version control. It covers some basic concepts and points to a few articles on how to actually implement getting your database in source control.

Source Control Software:

If you are looking for actual source control software, a list of applications can be found here: List of Source Control Systems with Visual Studio Plugins.


Solution:2

Don't make the mistake I did when putting the database definition under source code control by allowing branches and merges. This led developers (and managers) to assume they could have several versions of a table in the same database, leading to programmers overwriting each others changes, and having incompatible versions of source code and table definition all over the place.

As you might well imagine this lead to a great deal of wasted time and many frayed tempers.


Solution:3

Depending if time or money is more important, do you have the option to being someone in for a short time with the specific task of improving your processes? They would be able to set you up a test environment, install a version-control server and get your guys (and you) up to speed.


Solution:4

The first thing that you need to do is to give every developer their own copy of the database.
Secondly, you need each dev to be able re-create a baseline database from the master.
Once each dev is happy with their changes to the database, you will then need them to create a series of patches for their changes.
Lastly, each one of these patches needs to be able to checked in to source-control, and re-distributed to the other devs.
If you are looking for a good source control server, consider Subversion, with Tortoise SVN as your client.

Take a look at DBSourceTools. (http://dbsourcetools.codeplex.com).
It's specifically designed to help developers use source control for database changes.
This tool will allow you to baseline your database at a specific point, and create a named version (v1).
All files are scripted to disk, and very easy to add to a Subversion repository.

Have a look at the patching process for creating and using patches.

Have fun.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »