SSMS version control and source control integration with git?

梦想的初衷 提交于 2020-01-04 09:05:35

问题


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 wit 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.

Thanks guys,

Mike


回答1:


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

RedGate SQL Source Control




回答2:


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.



来源:https://stackoverflow.com/questions/35935593/ssms-version-control-and-source-control-integration-with-git

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!