Starts a collection set if the collector is already enabled and the collection set is not running. If the collector is not enabled, enable the collector by running sp_syscollector_enable_collector and then use this stored procedure to start a collection set.
sp_syscollector_create_collection_set must be run in the context of the msdb system database and SQL Server Agent must be enabled.
This procedure fails when run against a collection set that does not have a schedule. If the collection set does not have a schedule (because its collection mode is set to non-cached, for example), use the sp_syscollector_run_collection_set stored procedure to start the collection set.
This procedure enables the collection and upload jobs for the specified collection set, and will immediately start the collection agent job if the collection set has its collection mode set to cached (0). For more information, see sp_syscollector_create_collection_set.
If the collection set does not contain any collection items, this operation has no effect. Error 14685 is returned as a warning.
The following example starts a collection set using its identifier.
USE msdb; GO EXEC sp_syscollector_start_collection_set @collection_set_id = 1;