CaptRespect (jr******@renewalinc.com) writes:
We've been using CVS for our HTML, JAVA etc..
Now we would like to use it for our SQL CODE to. We have a large
database with many stored procedures.
I would like to have something using Ant like:
Download the latest version of source code.
If the SQL patch has been updated, run the patch to update the
Database.
I don't know how to deal with the SQL patch files. Do I update the
same file(over writing the anything from the previous patch, or just
write new files for each version?)
I am sure someone has done something like this.
What are the best practices for doing this? Could someone please
outline thier setup for SQL version control?
It seems that most people who use version control with SQL Server
uses Visual SourceSafe, which is probably more due to that that
VSS is conveniently at hand in the CD case, than the fantasic qualities
of VSS.
Obviously, if you are using CVS you should stick with that.
I don't know what Ant is, so I cannot really comment. Many people seem
to make integration with Visual Studio or some other tool a big issue.
Personally, I've always found that over-rated, and myself I use VSS
Explorer to check in and out stuff. That is the plain interface of the
CM tool.
Some people think that stored procedures are special, but they are really
not. They are just source code. The one thing which is devious is that
if you develop in Query Analyzer, is that the normal routine of development
is disrupted. The normal routine is 0) Check out 1) Edit. 2) Save. 3)
Compile. 4) Test. 5) On error back to 1. 6) Check in. With tool like
QA, 2) does not need to happen to 3 and 4. Therefore you run a risk of
checking in something that is not what you tested.
To avoid this I use a third party editor, Textpad (
www.textpad.com). It
does not have any special SQL capabilities, but it is an overall better
editor than QA. And from Textpad I invoke a command line tool that loads
the procedure. I happen to have my own tool, but OSQL does just fine.
--
Erland Sommarskog, SQL Server MVP,
so****@algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp