Database change management and build process using TFS

Does anyone use Team Foundation Server to manage their databases? We are currently using subversion. The team complains that it is difficult to create a build process in TFS and is evading it.

Any good pointers, articles, experiences?

+4
source share
4 answers

Managing changes to the database does not have much to do with your choice of version control systems, if you have it first. Of course, if you use change management tools from MS, you can be absolutely sure that they have been tested against TFS and the rest of the MS development kit. It’s true whether you use DBPro or older / crappier integration forms that can be seen in the classic VS database project or in SQL Management Studio, devoid of binding to projects / solutions. But there is no reason why you cannot use DBPro with Subversion or Red Gate with TFS.

The same goes for assembly. CC.NET vs Team Build, NAnt vs MSBuild, etc ... official MS tools, as a rule, roughly coincide with competitors. You have not described the database deployment process in great detail, but I can’t understand that in MSBuild it will be much more complicated than the script that you are using now, if at all. It is also easy to select different toolkits at different points in the stack: you can have MSBuild-based CC.NET builds that use the Red Gate command line deployment, or any other combination. It seems to me that the close integration offered when inserted into the MS world far exceeds the quirks in any tool, but there is a choice.

Let me understand: it seems your main problem is not technical, but getting database administrators to actually implement version control in the first place. If your dev and prod environments are their own living beings, not generic machines, determined solely by the result of some repetitive build process, then you are not using version control in your book. Imagine if a client-developer sometimes manually configured DLLs on different machines around the company, then complained that they were too difficult to synchronize; you would think that he is crazy.

In addition, the most important investments fall into a place where nothing is ever done directly from the database (more than you could pump in% programfiles%). If it is not in the source repository, it does not exist.

I do not think you are so important. You can write all your CREATE and ALTERs in Notepad, check them on the command line and create a “build process” as a 2-line shell script that combines them into a well-known file where the deployment script knows what to see. Or you can use a fancy tool like DBPro to enhance your performance with intellisense / unit / offline simulation testing, etc. There are excellent reasons for moving in the last direction (especially if you think declarative programming is what you should strive for in general), but I really think that the first step is the biggest.

+6
source

We use Visual Studio 2008 Team Suite along with TFS. I was able to easily import our databases into TFS. However, I found that most of the team (including database administrators) forgets to update TFS when an object changes in SQL.

Any build process will rely on DB Pro to generate difference scripts between your dev environment and the target environment. I found this to be problematic because our development environment is not a pure coincidence with our production environment. The permissions are certainly different, and we have a number of other cases where the changes were applied in dev / QA, but never went to prod (but also never changed). Trying to isolate your changes from many other changes in DB Pro is difficult because the user interface allows you to exclude objects from the final script (so if you change 2 objects and 1000 other different ones, you need to uncheck the other 1000 objects). In addition, configuration comparison schemes are often performed in tools-> options, while other tools, such as Red Gate, allow you to configure the comparison on the same screen on which you started it.

I think this tool has potential, but we certainly need to adapt existing procedures and systems to work with TFS. In addition, version checking on your database objects is invaluable, even if it is not 100% relevant.

+1
source

We use TFS with database editing.

The script database has post-scripts for loading Dev data into the database.

We regularly deploy the DEV environment. All SQL developers are installed locally, and they run their own Get Latest and Deploy.

In the Unit Test environment, logins, databases (OLTP and OLAP), replications, ETL packages, SQL jobs, etc. all are deployed in their individual places, and everything is sown.

Developers do not make any changes outside and do not test them, because deployment to Unit Test does not work.

+1
source

There is a lot more opinion on this issue: What are the real benefits of Visual Studio Team System Database Database (GDR)? (I don’t know why, but my searches led me to this question instead, and I had a lot of trouble finding opinions on this. I hope this link helps others doing the same search.)

0
source

All Articles