sp_syscollector_delete_collector_type (Transact-SQL)
Applies to: SQL Server
Deletes the definition of a collector type.
Transact-SQL syntax conventions
Syntax
sp_syscollector_delete_collector_type
[ [ @collector_type_uid = ] 'collector_type_uid' ]
[ , [ @name = ] N'name' ]
[ ; ]
Arguments
[ @collector_type_uid = ] 'collector_type_uid'
The GUID for the collector type. @collector_type_uid is uniqueidentifier, with a default of NULL
, and must have a value if @name is NULL
.
[ @name = ] N'name'
The name of the collector type. @name is sysname, and must have a value if @collector_type_uid is NULL
.
Return code values
0
(success) or 1
(failure).
Remarks
Either @collector_type_uid or @name must have a value; both can't be NULL
.
This procedure throws an error if collection items of this collection type exist.
Permissions
Requires membership in the dc_admin (with EXECUTE permission) fixed database role to execute this procedure.
Examples
This example deletes the Generic T-SQL Query collector type.
USE msdb;
GO
EXEC sp_syscollector_delete_collector_type
@collector_type_uid = '302E93D1-3424-4be7-AA8E-84813ECF2419';