Saturday, February 25, 2012

CM for stored procedures

What methods are people using out there to keep their stored procedures
under CM control? We are using CVS for our CM system. Looking for an easy
way to get stored procedures scripted out as text so we can check in/check
out of a CM system.

Thanks!

-- Mike BrownMike Brown (mbrownATautotecDOTcom) writes:
> What methods are people using out there to keep their stored procedures
> under CM control? We are using CVS for our CM system. Looking for an
> easy way to get stored procedures scripted out as text so we can check
> in/check out of a CM system.

It appears that the most commonly used version-control system is
Microsoft's own Visual SourceSafe. The prime reason for this is
probably because it's easily available. It does not have the name
for being the best tool in the game. (But it's OK for smaller shops.)

Anyway, you can use Query Analyzer or Enterprise Manger to script out
your SQL objects, but this something you should only do once. Once you
have your SQL code i CVS, CVS should be your source, nothing else. If
you need to change a procedure, you check it out and open it in Query
Analyzer. Or even better you use a 3rd party text editor that permits
you to invoke a command-line tool from the editor. That command-line
tool would be ISQL or OSQL. The point with this is that since the
file hits the disk before it hits the database, you have greater
certainty that what you check in is what's the database. (If you use
QA, you can forget to save after that last fix.)
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

No comments:

Post a Comment