Freigeben über


StartMonitor Method

Diese Funktion wird in zukünftigen Versionen von Microsoft SQL Server nicht mehr bereitgestellt. Verwenden Sie diese Funktion beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.

The StartMonitor method begins monitoring of the local Microsoft SQL Server Agent service by an instance of Microsoft SQL Server.

Syntax

object.StartMonitor(NetSendAddress,RetryAttempts)

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

  • NetSendAddress
    String that specifies a network user by workstation address as described in Remarks.

  • RetryAttempts
    Positive long integer that specifies a number of attempts made to restart SQL Server Agent service. When 0, no attempt is made to restart a stopped SQL Server Agent service job.

Prototype (C/C++)

HRESULT StartMonitor(
SQLDMO_LPCSTR szNetSendAddress,
long lRestartAttempts);

Hinweise

With an instance of SQL Server version 7.0, an instance of SQL Server can monitor the locally installed SQL Server Agent service.

When monitoring of SQL Server Agent service is enabled and abnormal termination is detected, the SQL Server Agent service:

  • Sends notification of SQL Server Agent service failure to the network user identified in the NetSendAddress argument, by network pop-up message.

  • Attempts to restart the SQL Server Agent service as directed.

Applies To: