Interromper Serviço SQL Agent
Microsoft.SQLServer.2016.StopSQLAgent (Task)
Interrompa Serviço SQL Agent
Observe que nenhuma edição do SQL Express dá suporte ao Serviço Windows SQL Server Agent.
Element properties:
Member Modules:
Source Code:
<Task ID="Microsoft.SQLServer.2016.StopSQLAgent" Target="SQL2016Core!Microsoft.SQLServer.2016.Agent" 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/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Agent"]/ServiceName$</CommandLine>
<TimeoutSeconds>300</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files/>
</WriteAction>
</Task>