SQL Job ScripterSQL Job Scripter is a command line utility that produces scripts of SQL Agent jobs. It will script either to a single file or to one file per job.
The sql
jobscripter utility scripts out SQL Agent jobs into individual files suitable for source control
-S <servername>
-1
switch | parameter | description |
-S | server_name | server name to connect to |
-d | directory | output directory use double quotes if there are any spaces |
-p | prefixofjob | prefix of the job name to select ex: "DBA_" |
-1 | one_file | put the output into just one file |
-m | many_files | put the output into many files |
Example:
sql
jobscripter -S (local) -p DBA_ -m -1 d "c:\source control\server1\jobs"
The defaults for server, directory and prefix are also in the sql
jobscripter.exe.config file.