Iniciar Serviço SQL Agent
Microsoft.SQLServer.2008.StartSQLAgent (Task)
Inicie o 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.2008.StartSQLAgent" Target="SQL2008Core!Microsoft.SQLServer.2008.Agent" Accessibility="Internal" Enabled="true" Remotable="false">
<Category>Maintenance</Category>
<WriteAction ID="WA" TypeID="System!System.CommandExecuter" RunAs="SQL!Microsoft.SQLServer.SQLDefaultAccount">
<ApplicationName/>
<WorkingDirectory/>
<CommandLine>net start $Target/Property[Type="SQL!Microsoft.SQLServer.Agent"]/ServiceName$</CommandLine>
<TimeoutSeconds>300</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files/>
</WriteAction>
</Task>