共用方式為


StartMonitor 方法

Starts monitoring the local SQL Server Agent Service by an instance of SQL Server.

命名空間:  Microsoft.SqlServer.Management.Smo.Agent
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Sub StartMonitor ( _
    netSendAddress As String, _
    restartAttempts As Integer _
)
'用途
Dim instance As JobServer
Dim netSendAddress As String
Dim restartAttempts As Integer

instance.StartMonitor(netSendAddress, _
    restartAttempts)
public void StartMonitor(
    string netSendAddress,
    int restartAttempts
)
public:
void StartMonitor(
    String^ netSendAddress, 
    int restartAttempts
)
member StartMonitor : 
        netSendAddress:string * 
        restartAttempts:int -> unit 
public function StartMonitor(
    netSendAddress : String, 
    restartAttempts : int
)

參數

  • netSendAddress
    型別:System. . :: . .String
    A String value that specifies a net send address to notify when the SQL Server Agent Service has stopped.
  • restartAttempts
    型別:System. . :: . .Int32
    An Int32 value that specifies the number of times to attempt to restart the SQL Server Agent Service if it has stopped.