Events
Mar 31, 11 p.m. - Apr 2, 11 p.m.
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Deletes a collection item from a collection set.
Transact-SQL syntax conventions
sp_syscollector_delete_collection_item
[ [ @collection_item_id = ] collection_item_id ]
[ , [ @name = ] N'name' ]
[ ; ]
The unique identifier for the collection item. @collection_item_id is int, with a default of NULL
. @collection_item_id must have a value if @name is NULL
.
The name of the collection item. @name is sysname, with a default of an empty string. @name must have a value if @collection_item_id is NULL
.
0
(success) or 1
(failure).
sp_syscollector_delete_collection_item
must be run in the context of the msdb
system database. Collection items can't be deleted from system collection sets.
The collection set that contains the collection item is stopped and restarted during this operation.
Requires membership in the dc_admin (with EXECUTE permission) fixed database role to execute this procedure.
The following example deletes a collection item named MyCollectionItem1
.
USE msdb;
GO
EXEC sp_syscollector_delete_collection_item @name = 'MyCollectionItem1';
Events
Mar 31, 11 p.m. - Apr 2, 11 p.m.
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today