Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 1.54 KB

sp-syscollector-enable-collector-transact-sql.md

File metadata and controls

64 lines (46 loc) · 1.54 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_syscollector_enable_collector (Transact-SQL)
Enables the data collector.
markingmyname
maghan
randolphwest
07/04/2023
sql
system-objects
reference
sp_syscollector_enable_collector
sp_syscollector_enable_collector_TSQL
sp_syscollector_enable_collector
data collector [SQL Server], stored procedures
TSQL

sp_syscollector_enable_collector (Transact-SQL)

[!INCLUDE SQL Server]

Enables the data collector. Because there is only one data collector per server, no parameters are required.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_syscollector_enable_collector
[ ; ]

Arguments

None.

Return code values

0 (success) or 1 (failure).

Remarks

Defaults to the data collector on the server.

Permissions

Requires membership in the dc_admin or dc_operator (with EXECUTE permission) fixed database role to execute this procedure.

Examples

The following example enables the data collector.

USE msdb;
GO
EXEC dbo.sp_syscollector_enable_collector;

Related content