In our company, we use the Team Foundation server for the Visual Studio command system to track code versions and manage stored procedures versions; stored procedures are processed just like any other source of code.
The database does not automatically synchronize with TFS; therefore for each new SP you need:
- Create it
- Add it to TFS
- registration
- Add to database
if you need to change:
- Log on to TFS
- Change Source
- Log in to TFS
- Edit in database
When we need to fix production, we officially ask dba to synchronize the new / modified stored procedure with our production database and download the latest version from TFS.
Possible problem scenario:
- Lazy developers (like me) modify the SP directly on the Sql server and do not align the code on TFS
- Crazy developers (like me) forget to check the latest fixed version and alignment dba listening in production
source share