Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Source control for databases


Source control for databases

Poll
Have you considered using source control for databases?

7.69% - 5 votes No
7.69% 5 votes
15.38% - 10 votes We evaluated it and couldn't come up with a productive method
15.38% 10 votes
4.62% - 3 votes We tried it and abandoned it
4.62% 3 votes
44.62% - 29 votes Yes we are evaluating it
44.62% 29 votes
27.69% - 18 votes Yes we source control our databases
27.69% 18 votes
Member votes: 63, Guest votes: 0. You don't have permission to vote in this poll
Author
Message
David.Poole
David.Poole
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5687 Visits: 3226
Every now and again the subject of source-controlling database objects gets raised.

I work in a 400 strong IT department and so far the only situation we have had where code clashes occurred were in an apallingly badly designed database. Had the database been designed properly there would have been no clash.

I am curious to know what your experience with database source control has been.

LinkedIn Profile

Newbie on www.simple-talk.com
GSquared
GSquared
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19433 Visits: 9730
I use source control for all DDL commands to be issued. Haven't found that it actually helps with anything, but it might some day. I think it makes the other devs and such feel more comfortable, gives them a sort of warm fuzzy feeling that they are "doing it right".

I'm a firm believer in what could be called "service packs" for the database. All DDL scripts and any related DML scripts (to populate lookup tables and such) get put into a single script that contains error handling, commenting, lists the author(s) and the purpose of the changes, and can be run repeatedly without harming the database or crashing the script. If stored and run sequentially, starting with the original "create database" script, they should return a database to any point-in-time you want, in terms of code and structure (not data, of course).

Storing those in Source Safe makes the devs comfortable. And, since they need to be kept somewhere, it might as well be in a source control system.

That's what I use source control for. Could just as easily store the scripts as varchar(max) objects in a database. Doesn't matter much to me.

- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Steve Jones
Steve Jones
SSC-Forever
SSC-Forever (49K reputation)SSC-Forever (49K reputation)SSC-Forever (49K reputation)SSC-Forever (49K reputation)SSC-Forever (49K reputation)SSC-Forever (49K reputation)SSC-Forever (49K reputation)SSC-Forever (49K reputation)

Group: Administrators
Points: 49524 Visits: 18998
The only good method I've seen so far is to source control the DDL scripts (maybe DML deployment as well).

As soon as you allow GUI changes, things easily get out of hand.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Grant Fritchey
Grant Fritchey
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26519 Visits: 32480
I love it. Integrating our builds with the development builds makes everything so much easier. The power that comes from knowing exactly what has changed, when, by whom, makes all our development and deployment processes work better. The tool that really makes it all shine is Visual Studio Team System Database Edition, aka Data Dude. Great stuff.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
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