[SQL Server] Agent
Q100054: [SQL Server] Agent
Starts/monitors a SQL Agent job on specified SQL Server.
Parameter | In/Out | Description | Other Info |
---|---|---|---|
DB connection | In | Assign a defined SQL Server Connection or directly enter the parameters and values which make up a valid connection for SQL Server . |
Connection type: sysSqlServer |
Job Name | In | Name of SQL Server Agent job. | |
Operation | In | Choices: StartAndStatus , StatusOnly , StopAndStatus Specifies whether to start job, stop job, or just get status. |
|
Timeout seconds | In | Timeout in seconds for the operations to execute. Default is 0 seconds, the same as SSMS, which will wait indefinitely. | Default: 0 |
Log output level | In | Choices: Minimal , Verbose The level of execution detail you want to appear in the log. |
Default: Minimal |
Step Name | Out | Name of executing step, or (Job outcome) if job completed. | |
Message | Out | Message for step/overall job if completed. | |
Status | Out | Status for step/overall job if completed. | |
RunDate | Out | Step/Job run date. | |
RunDuration | Out | Step/Job run duration in seconds. |
(Italics = required parameters)
Notes
The [SQL Server] Agent
module provides a method for starting or stopping SQL Agent jobs, as well as a method for checking on the status of the job and use the result of the status in further steps. The module requires that a SQL Server Connection
is defined for communicating with the desired SQL Server and this is used by the DB Connection
parameter. The Job name
parameter is the name of the SQL Server Agent Job that you wish to perform an operation on. The various operations you can perform are outlined in the following table.
Operation | Description |
---|---|
StartAndStatus | Start the specified job name on the SQL Agent and return the current status. |
StatusOnly | Get the current status of the named SQL Agent job. |
StopAndStatus | Stop the specified job name on the SQL Agent and return the current statis. |
The Step Name
, Message
, Status
, RunDate
, and RunDuration
output parameters all provide information directly from the SQL Server Agent about the named job.