MS SQL Maestro online Help
Prev | Return to chapter overview | Next |
Jobs
The job object exposes the attributes of a single SQL Server Agent job. Using SQL Server Agent jobs, you can automate administrative tasks and run them on a recurring basis. You can run a job manually or schedule it to run in response to schedules and alerts. Jobs can be written to run on the local instance of Microsoft SQL or on multiple servers. To run jobs on multiple servers, you must set up at least one master server and one or more target servers.
Anyone can create a job, but a job can be edited only by its owner or members of the sysadmin role.
Only one instance of the job can be run at a time. If you try to run a job manually while it is running as scheduled, SQL Server Agent refuses the request.
To prevent a scheduled job from running, you should either disable the schedule using the corresponding option of the Schedule Editor dialog window, or disable the job using Job Editor, drop the schedule using the Drop Schedule item of the popup menu in the Available Schedules field of Job Editor, or stop the SQLSERVERAGENT service on the server.
Note: Before starting a job make sure that the SQLSERVERAGENT service is currently running on the server.
New jobs are created within Create Job Wizard. In order to run this wizard you should either
or
|
Jobs are edited within Job Editor. In order to open the editor you should either
or
|
To drop the existing job:
or
and confirm dropping in the dialog window.
|
A job step is an action that the job takes on a database or a server. Every job must have at least one job step. Job steps can be operating system commands, Transact-SQL statements, Microsoft® ActiveX® scripts, or replication tasks.