SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Put your Database under Source Control


Put your Database under Source Control

Author
Message
Thomas Liddle
Thomas Liddle
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1098 Visits: 115
Comments posted to this topic are about the item Put your Database under Source Control

Thomas Liddle
SQL Server Administrator
Video Blog - YouTube
Web Blog - www.thomasliddledba.com
Twitter - @thomasliddledba
Facebook - @thomasliddledba
rgp151
rgp151
SSC Veteran
SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)

Group: General Forum Members
Points: 229 Visits: 87
thomasliddledba - Wednesday, January 18, 2017 12:03 AM
Comments posted to this topic are about the item Put your Database under Source Control

The Red Gate tools look nice, but we've actually done something where we've created a nightly job that scripts out all of the objects in every database on our SQL server to a folder structure on a network drive, and then runs GIT, which checks in any files that have changed since the previous night. This gives us automatic DDL backups of everything, and it's pretty nice.
browndog
browndog
SSC-Enthusiastic
SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)

Group: General Forum Members
Points: 149 Visits: 83
Nice article. Please note that with Visual Studio you can also use SSDT and source control your database project. VS now integrates with GIT nicely so it can be the source repository



Thomas Liddle
Thomas Liddle
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1098 Visits: 115
rgp151 - Wednesday, January 18, 2017 4:50 AM
thomasliddledba - Wednesday, January 18, 2017 12:03 AM
Comments posted to this topic are about the item Put your Database under Source Control

The Red Gate tools look nice, but we've actually done something where we've created a nightly job that scripts out all of the objects in every database on our SQL server to a folder structure on a network drive, and then runs GIT, which checks in any files that have changed since the previous night. This gives us automatic DDL backups of everything, and it's pretty nice.

rgp151 - That's a great way to perform backups of DDL's in all your databases. I hope you can share the code. Smile Another way to think about this is from a development perspective. In my world as a DBA, I support a common database on each of the servers I manage. The two teams (Engineering and Operations) we are always tweaking code and use the RedGate Source Control/Jenkins to source control and deployement.

I use the SVN repository we have (moving to GIT really soon) as my backup/version control.

I've always been in the mindset with Database Administration is that there are 1000 ways to skin a cat. I like your thought process.

Thomas Liddle
SQL Server Administrator
Video Blog - YouTube
Web Blog - www.thomasliddledba.com
Twitter - @thomasliddledba
Facebook - @thomasliddledba
Thomas Liddle
Thomas Liddle
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1098 Visits: 115
browndog - Wednesday, January 18, 2017 6:51 AM
Nice article. Please note that with Visual Studio you can also use SSDT and source control your database project. VS now integrates with GIT nicely so it can be the source repository

browndog - Thanks. I'll need to do some more research with VS and GIT to become familiar with it.

Thomas Liddle
SQL Server Administrator
Video Blog - YouTube
Web Blog - www.thomasliddledba.com
Twitter - @thomasliddledba
Facebook - @thomasliddledba
rgp151
rgp151
SSC Veteran
SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)

Group: General Forum Members
Points: 229 Visits: 87
browndog - Wednesday, January 18, 2017 6:51 AM
Nice article. Please note that with Visual Studio you can also use SSDT and source control your database project. VS now integrates with GIT nicely so it can be the source repository

True, BUT, this assumes all DDL changes are taking place though SSDT. If that's true then this works just fine, but in many environment many changes can and do take place outside of SSDT. The nice thing about the approaches being discussed is that they will version ALL DLL changes to source control, regardless of how they were performed.

browndog
browndog
SSC-Enthusiastic
SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)

Group: General Forum Members
Points: 149 Visits: 83
rgp151 - Wednesday, January 18, 2017 9:40 AM
browndog - Wednesday, January 18, 2017 6:51 AM
Nice article. Please note that with Visual Studio you can also use SSDT and source control your database project. VS now integrates with GIT nicely so it can be the source repository

True, BUT, this assumes all DDL changes are taking place though SSDT. If that's true then this works just fine, but in many environment many changes can and do take place outside of SSDT. The nice thing about the approaches being discussed is that they will version ALL DLL changes to source control, regardless of how they were performed.



Agreed. You'd have to do a compare in the SSDT database project from source to the target DB to catch any changes made outside of the SSDT




David Atkinson
David Atkinson
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1020 Visits: 538
rgp151 - Wednesday, January 18, 2017 4:50 AM
thomasliddledba - Wednesday, January 18, 2017 12:03 AM
Comments posted to this topic are about the item Put your Database under Source Control

The Red Gate tools look nice, but we've actually done something where we've created a nightly job that scripts out all of the objects in every database on our SQL server to a folder structure on a network drive, and then runs GIT, which checks in any files that have changed since the previous night. This gives us automatic DDL backups of everything, and it's pretty nice.

@rgp151 - have you taken a look at DLM Dashboard, a free Redgate tool which uses the same approach? If it doesn't do what you want I'd be keen to understand why.

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search