How can I generate scripts for all jobs running on my SQL Server? I want one script that includes all jobs and one script for each individual job.
You can use SQL Distributed Management Objects (SQL-DMO) to obtain a list of jobs. Use the JobServer object and iterate through the Jobs collection. To obtain each job's script, you can call the Scripts method for that job. Here's what you should do:
- Start Visual Basic (VB) 6.0.
- Start a standard EXE project.
...