| title | Enable or disable data collection | ||
|---|---|---|---|
| description | Enable or disable data collection with SQL Server Management Studio or Transact-SQL. | ||
| author | MashaMSFT | ||
| ms.author | mathoma | ||
| ms.reviewer | randolphwest | ||
| ms.date | 12/28/2023 | ||
| ms.service | sql | ||
| ms.subservice | supportability | ||
| ms.topic | how-to | ||
| helpviewer_keywords |
|
[!INCLUDE SQL Server]
This article describes how to enable or disable data collection in [!INCLUDE ssnoversion] by using [!INCLUDE ssManStudioFull] or [!INCLUDE tsql].
Requires membership in the dc_admin or dc_operator (with EXECUTE permission) fixed database role to execute this procedure.
-
In Object Explorer, expand the Management node.
-
Right-click Data Collection, and then select Enable Data Collection.
-
In Object Explorer, expand the Management node.
-
Right-click Data Collection, and then select Disable Data Collection.
-
Connect to the [!INCLUDE ssDE].
-
From the Standard bar, select New Query.
-
Copy and paste the following example into the query window and select Execute. This example uses sp_syscollector_enable_collector to enable the data collector.
USE msdb;
GO
EXEC dbo.sp_syscollector_enable_collector;-
Connect to the [!INCLUDE ssDE].
-
From the Standard bar, select New Query.
-
Copy and paste the following example into the query window and select Execute. This example uses sp_syscollector_disable_collector to disable the data collector.
USE msdb;
GO
EXEC dbo.sp_syscollector_disable_collector;