title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sp_syscollector_stop_collection_set (Transact-SQL) |
Stops a collection set. |
markingmyname |
maghan |
randolphwest |
07/04/2023 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
Stops a collection set.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_syscollector_stop_collection_set
[ [ @collection_set_id = ] collection_set_id ]
[ , [ @name = ] N'name' ]
[ , [ @stop_collection_job = ] stop_collection_job ]
[ ; ]
The unique local identifier for the collection set. @collection_set_id is int, with a default of NULL
. @collection_set_id must have a value if @name is NULL
.
The name of the collection set. @name is sysname, with a default of NULL
. @name must have a value if @collection_set_id is NULL
.
Specifies that the collection job for the collection set should be stopped if it is running. @stop_collection_job is bit, with a default 1
.
@stop_collection_job applies only to collection sets with collection mode set to cached. For more information, see sp_syscollector_create_collection_set (Transact-SQL).
0
(success) or 1
(failure).
sp_syscollector_create_collection_set
must be run in the context of the msdb
system database.
Requires membership in the dc_operator (with EXECUTE permission) fixed database role to execute this procedure.
The following example stops a collection set using its identifier.
USE msdb;
GO
EXEC sp_syscollector_stop_collection_set
@collection_set_id = 1;