script job as sql, .... and back again.

  • I understand how to script a job that I have created in SQL server agent/jobs as an SQL statement, which is handy as a backup, but supposing that I had a catastrophic failure of SQL server and had to reinstall everything again, is there a way to recreate the job using the sql script created, please ?

  • You just run the script. That's the idea behind the scripting feature. You run that script on another server to recreate the job.

  • Thank you for that, but how do I get it to appear in the Job List, please ?

  • When you run the script, it will appear.

    The script has calls to sp_create_job, etc. that is exactly the same things run by SSMS when you build the job in the GUI. If it doesn't appear when you run it, refresh.

  • Fantastic !, thank you ever so much 🙂

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply