Include job in bak to be activated on restore

Include job in bak to be activated on restore

I have a database with stored procedures and a maintenance job that runs some of the stored procedures nightly.

When I take a backup of the database, is there any way that I can include the job in the backup?

I would like to achieve a minimal effort to schedule the job, when the .bak file is restored into a server, back as a database.

Antwort1

When I got no answers here, I posted about the same issue on StackOverflow.

A job can be saved as Create-script.

A solution could be to make a script that both restores the database, and creates the job. Then the user will only have to run one script.

See this question for more details: stackoverflow.com/q/19168958/237509

verwandte Informationen