Iniciar el servicio Agente SQL
Microsoft.SQLServer.2014.StartSQLAgentFromJob (Task)
Inicie el servicio Agente SQL
Tenga en cuenta que el servicio de Windows del Agente SQL Server no se admite en ninguna edición de SQL Server Express.
Element properties:
Member Modules:
Source Code:
<Task ID="Microsoft.SQLServer.2014.StartSQLAgentFromJob" Target="SQL2014Core!Microsoft.SQLServer.2014.AgentJob" Accessibility="Internal" Enabled="true" Remotable="false">
<Category>Maintenance</Category>
<WriteAction ID="WA" TypeID="System!System.CommandExecuter" RunAs="SQL2014Core!Microsoft.SQLServer.2014.SecureReference.Task">
<ApplicationName/>
<WorkingDirectory/>
<CommandLine>net start $Target/Host/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.Agent"]/ServiceName$</CommandLine>
<TimeoutSeconds>300</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files/>
</WriteAction>
</Task>