Skip to content

Latest commit

 

History

History
83 lines (63 loc) · 3.3 KB

File metadata and controls

83 lines (63 loc) · 3.3 KB
title sp_syscollector_run_collection_set (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql-non-specified
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
sp_syscollector_run_collection_set_TSQL
sp_syscollector_run_collection_set
dev_langs
TSQL
helpviewer_keywords
sp_syscollector_run_collection_set
data collector [SQL Server], stored procedures
ms.assetid 7bbaee48-dfc7-45c0-b11f-c636b6a7e720
caps.latest.revision 9
author JennieHubbard
ms.author jhubbard
manager jhubbard

sp_syscollector_run_collection_set (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]

Starts a collection set if the collector is already enabled and the collection set is configured for non-cached collection mode.

Note

This procedure will fail if it is run against a collection set that is configured for cached collection mode.

sp_syscollector_run_collection_set enables a user to take on-demand data snapshots.

Applies to: [!INCLUDEssNoVersion] ([!INCLUDEssKatmai] through current version).

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
sp_syscollector_run_collection_set [[ @collection_set_id = ] collection_set_id ]  
          , [[ @name = ] 'name' ]   

Arguments

[ @collection_set_id = ] collection_set_id
Is the unique local identifier for the collection set. collection_set_id is int and must have a value if name is NULL.

[ @name = ] 'name'
Is the name of the collection set. name is sysname and must have a value if collection_set_id is NULL.

Return Code Values

0 (success) or 1 (failure)

Remarks

Either collection_set_id or name must have a value, both cannot be NULL.

This procedure will start the collection and upload jobs for the specified collection set and will immediately start the collection agent job if the collection set has its @collection_mode set to non-cached (1). For more information see, sp_syscollector_create_collection_set (Transact-SQL).

sp_sycollector_run_collection_set can also be used to run a collection set that does not have a schedule.

Permissions

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

Example

Start a collection set using its identifier.

USE msdb;  
GO  
EXEC sp_syscollector_run_collection_set @collection_set_id = 1;  

See Also

System Stored Procedures (Transact-SQL)
Data Collection