SQL Scripting (was RE: [cvsnt] Synchronize source code with database?)

Bo Berglund Bo.Berglund at system3r.se
Tue Oct 19 13:44:06 BST 2004


The problem was that we could not rely on the scripting to put non-changed commands
in the same place in the script file all the time so there would be a lot of diffs
only because of placement issues.
And the default names for constraints etc were very strange to us, so we create them
manually instead.
We have a setup engine that uses the script file and runs it against the database server
in a special way to get everything in the proper order. We also separated scripts for
security, structure, procedures and contents into different files.

Now we are enforcing ALL changes, even those done during development, to be made through
modifications of the scripts and running them in Query Analyzer. THis makes us confident
that the final scripts from a developer will actually be useful in the field as well.
Noone is allowed to use Enterprise Manager to edit the database structure...

Bo


-----Original Message-----
From: Peter Crowther [mailto:Peter.Crowther at melandra.com]
Sent: den 19 oktober 2004 10:51
To: Bo Berglund
Cc: CVS-NT Mailing list (E-mail)
Subject: SQL Scripting (was RE: [cvsnt] Synchronize source code with
database?)


> From: Bo Berglund [mailto:Bo.Berglund at system3r.se] 
[...]
> With SQL-Server we do it differently. Here we have moved to a 
> sql script that creates the database on the target system.
[...]
> We update this script manually (do not use the SQL automatic scripting
> function!) so wa can keep a good control over where items are 
> done and also the naming system is under control.

The auto-scripting function seems to be tolerable in SQL2000, Bo - what
problems have you come up against?  Although I agree that I'll use a
hand-maintained script if given the choice!

		- Peter



More information about the cvsnt mailing list