How can I control database schema versions?

Is there (Cheap or FLOSS) version control for SQL Server 2008 DB schema?

+1
source share
3 answers

Here's a good Jeff Atwood article on database versioning

You can use Team edition for database professionals for this purpose.

Here is a list of tools that you can purchase that can also be used:

Red Gate SQL Compare with $ 295.

DB Ghost from $ 195

SQL Change Manager $ 995 per instance.

SQL Effects Clarity Standard ed. from $ 139

SQLSourceSafe from $ 129.

sqlXpress Diff contact for price .: - (

Embarcadero Change Manager Contact: Price: - (

Apex SQL Diff from $ 399

SQL Source Control 2003 from $ 199

SASSI v2.0 Professional from $ 180

Evorex Source # shareware or $ 299 + (conflicting reports!)

Edit Just found this post that explains svn version control: SQL Server database version

+5
source

Create a database project for the database in Visual Studio. Check out this project on a library system such as SVN or Team Foundation Server.

+1
source

In my experience in the corporate environment there is no easy choice.

Three methods are listed below: (regardless of the toolbox used).

1) Dump the whole scheme to a file and save the file in the repository

PROS: Easy

CONS: large file - difficult to edit manually - hard to see what has changed from the latest version - cannot deploy it, so some mechanism will be needed to prepare a DIFF script between Dev and Test / Live systems

2) Dump each database object into a separate file stored in the repository.

PROS: It's very easy to see what has changed. It can easily create deployment scripts for most objects (although some things will still require a DIFF script, such as changing the definition of columns)

CONS: you need to run scripts in a certain order - managing this process can be quite difficult.

3) Consider each change as a separate operation with its own sequential numbered SQL script.

PROS: It’s easy for developers to create scripts, the same scripts can be run on each platform (theoretically)

CONS: A management nightmare - an order can become a problem, it is very difficult to see what has changed in a release, or when a given object has changed.

Having run all 3 options, I would say that 2 are great to work with them, but it took more time to configure in the first place - getting all the scripts executed in the correct order took time - and STILL it took to use the diff tool for the database for scripting for UAT / Live. Therefore, I would recommend a combination between 1 and 2.

+1
source

Source: https://habr.com/ru/post/895753/


All Articles