Scripting the SQL 2005 Database Structure at Night

I would like to have work that runs every night or even once a week that generates a script from our developer databases. They usually messed with developers, and developers are used to making changes without writing or documenting them.

I would like to create a task that essentially mimics what happens when I right-click and perform tasks> Generate Scripts. This would mean that in the case of Something Bad Happening, we can restore the structure (the content is “generated”) and be backup and working without the need to restore from backups that could be lost at the same time as something bad.

I read about sqlpubwiz, but could not find it on the dev machine, only on my local machine, where I have only client tools installed. Am I going on the right route?

+3
source share
3 answers

I would suggest a different approach that worked for me. Run the night task, which deletes the development databases, restores them from the known configuration, and then applies all the change scripts that were transferred to the source code.

The advantages of this approach:

  • Change scripts checked every night
  • There are no changes to files without a name.
  • Developers quickly learn to create change scenarios and link them to source control

, . , , , .

+2

, .

0
0

Source: https://habr.com/ru/post/1699229/


All Articles