Остановка службы агента SQL Server
Microsoft.SQLServer.2016.StopSQLAgentFromJob (Task)
Остановка службы агента SQL Server
Обратите внимание, что служба Windows агента SQL Server не поддерживается ни в одном из выпусков SQL Server Express.
Element properties: Member Modules:
Source Code: <Task ID="Microsoft.SQLServer.2016.StopSQLAgentFromJob" Target="SQL2016Core!Microsoft.SQLServer.2016.AgentJob" Accessibility="Internal" Enabled="true" Remotable="false">
<Category>Maintenance</Category>
<WriteAction ID="WA" TypeID="System!System.CommandExecuter" RunAs="GPMP!Microsoft.SQLServer.TaskAccount">
<ApplicationName/>
<WorkingDirectory/>
<CommandLine>net stop $Target/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Agent"]/ServiceName$</CommandLine>
<TimeoutSeconds>300</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files/>
</WriteAction>
</Task>