문제

When I take a backup of a database (SQL Server), is there any way that I can include a scheduled job in the backup?

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

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.

도움이 되었습니까?

해결책

I don't have the quick button to click for your problem, but I think (not sitting in front of it right now) You can right click a job and get a script for its creation including scheduling specifics. I don't know how to include a job in a backup and how to restore it, though. I think restoring a job would require a script with the CREATE for the job to be run.

다른 팁

You can also back up the msdb database. The msdb database is where all the jobs live, it is one of the system databases, and then restore your database plus msdb.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top