MikeS
MikeS

Reputation: 247

SQL Server version control integration with git?

I have an ERP system which I maintain with a team of people. However lately we seem to be loosing track of who's changing what and we need a solution to be able to control these changes. We are looking into the enterprise version of GIT as all our software development and web development would work perfectly with it. Not to mention I have some experience with GIT already.

The problem is we need the version control to extend to our SQL Server which we use SQL Server Management Studio to maintain. We have thousands of tables in 6 main databases which have a lot of stored procedures which are being changed.

It's not so much we want to control the source as in, permissions and refuse changes by people. It's more, we need a way of tracking changes and attaching explanations to help our future selves.

Does anyone know any solid solutions which would fit our purpose? Assume the cost isn't a main factor.

Upvotes: 3

Views: 2661

Answers (2)

Ivan Gritsenko
Ivan Gritsenko

Reputation: 4236

I have been asking myself this question once. So I've found following solution which I can suggest you to use.

It is a SQL Server Data Tools that solves the problem.

The tools include SQL server database project for visual studio. This project will store your database structure. You can just add it to you solution. Then run a schema comparison with your database to take a snapshot of your current database state. You can choose what objects to compare. Since this moment your have all your changes being tracked by your VCS. Every change is documented now.

You can make changes in DB project and when you are done just run schema comparison, get the update script and apply those changes to your SQL server database. It is really not that hard to work with your schema from DB project as it provides intellisense, syntax validation. Also it is possible to write and execute SQL queries against you database.

Upvotes: 0

FLICKER
FLICKER

Reputation: 6683

I was using RedGate tool. It can integrate with Git.

RedGate SQL Source Control

Upvotes: 1

Related Questions