I've got the task to automate the database modification scripts in our simulation server.
Each simulation generates a few databases, all based from an common base DB, which is empty.
But now is needed to do the same to get the data from last year's simulation database.
I devised to create an clone of that DB based on a backup from the moment we need. And apply all database changes from the moment the DB was created till now.
So the mechanism I imagine is something that can run an script (like the ones generated either by ER/Studio or SSMS) stored in a version table - which will be called from a SQL Agent job step.
EDIT: What is the simplest way to do that - running an script stored in a table from an SQL Agent job step?
P.S.: if the solution can avoid xp_cmdShell or sql_cmd or even preprocessing the script either in Delphi or in a SQLCLR function, it's better - but if's the only way I can cope with that.