Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 Strategies
»
Source control for databases
Source control for databases
Rate Topic
Display Mode
Topic Options
Have you considered using source control for databases?
Poll Results
Votes
No
8.51%
4
We evaluated it and couldn't come up with a productive method
17.02%
8
We tried it and abandoned it
4.26%
2
Yes we are evaluating it
40.43%
19
Yes we source control our databases
29.79%
14
Member Votes: 45, Anonymous Votes: 0.
You don't have permission to vote within this poll.
Author
Message
David.Poole
David.Poole
Posted Wednesday, July 15, 2009 9:02 AM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 8:46 AM
Points: 2,750,
Visits: 1,410
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
Post #753558
GSquared
GSquared
Posted Wednesday, July 15, 2009 10:10 AM
SSCoach
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 1:55 PM
Points: 15,442,
Visits: 9,571
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
Post #753640
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Wednesday, July 15, 2009 10:45 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436,
Visits: 13,751
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
Post #753667
Grant Fritchey
Grant Fritchey
Posted Wednesday, July 15, 2009 11:12 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 3:41 AM
Points: 13,383,
Visits: 25,189
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 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #753680
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.