RetryAttempts Property

后续版本的 Microsoft SQL Server 将删除该功能。 请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。

The RetryAttempts property specifies a number of times SQL Server Agent attempts to execute the referenced job step before reporting step failure.

语法

object.RetryAttempts [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list

  • value
    A long integer

Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetRetryAttempts(LPLONG pRetVal);
HRESULT SetRetryAttempts(long NewValue);

注释

SQL Server Agent job steps are assigned simple logic determining job execution behavior on step success or failure.

If the job step completes successfully on any attempt numbered less than or equal to the value of the RetryAttemptsproperty, job execution branches to follow the on-success action for the step. If execution attempts exceed the value of the RetryAttemptsproperty, job execution branches to follow the on-failure action for the step.

If a job step fails and the step is flagged for retry, SQL Server Agent can pause between execution attempts. For more information, see RetryInterval Property.

Applies To: