Sql-server – Best place to keep backup scripts

best practicessql server

Where is the best place to leave the Database Backup scripts, currently I let them on the Backup Job itself, however I wonder if it's best to leave on a Database

Best Answer

Source control. This way you have a centralized store for all of your scripts so that any DBA/Developer can access them and use them if needed. Tracking changes to core scripts used day to day in your environment is critical.

You could convert them to stored procedures so that they are included in the database backup it's self but this doesn't provide an easy way to view changes to the script that happened at some time in the past.