how to source control database code… | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

how to source control database code…

i need some ideas here please. more details the better.
Using Visual source safe is the better tool with SQL server when you can handle the code/schema changes with easy compatbility. Check MS site for latest utilities on VSS and using visual studio. _________
Satya SKJ

how to you use VSS in this way?
check out to text file, copy into Query Analyzer, make changes, save to a file, check that file into VSS. is that your process? seems time consuming.

Although it can be time consuming, using a tool like source safe (and its the one I’d choose) and enforcing its use is the best way to control the code. What is more time consuming is tracking down rogue versions of code, trying to figure out what version of code was running on what date etc. Taking the time to use SS can save you hours and data. If you use source safe, make sure people cant see the SS directories in explorer, it will just defeat the purpose as they will go around it. Periodically scan hard drives to find any other .sql files out there and work with the coder to ensure that its tracked properly in SS. If code is run regularly then it should probably be in a stored proc rather than compiled each time in QA. Then store the proc source code in SS. This way if you ever are in a positon where you need to recreate your processes, you have a current (and if you chose to keep it in SS) point in time complete version of your code. Any form of source control will take more effort and time than just allowing people to save code whereever and whenever. Source Safe is a product known to work with sql code. Just my take on it. Chris
Advantages of using VSS
– You can version control your software, as VSS maintains all your changes as different versions
– You can go back to a previous known good version of your stored procedure, if a developer makes a mistake
– Using the labelling feature, you can revert back to an entire set of scripts at a particular point in time
– You can control access to your source code by configuring permissions to your developers
– By maintaining backups of VSS database, you can secure all your code centrally, instead of worrying about individual script files. More information review at _________
Satya SKJ

Also Visual Studio allows you to edit/execute the VSS scripts from within the IDE and the next VS will be even more tightly integrated Cheers