sp_syscollector_create_collection_set (języka Transact-SQL)
Tworzy nowy zestaw kolekcji.Tej procedury składowanej można użyć do utworzenia niestandardowego zestawu kolekcji dla kolekcji danych.
sp_syscollector_create_collection_set
[ @name = ] 'name'
, [ [ @target = ] 'target' ]
, [ [ @collection_mode = ] collection_mode ]
, [ [ @days_until_expiration = ] days_until_expiration ]
, [ [ @proxy_id = ] proxy_id ]
, [ [ @proxy_name = ] 'proxy_name' ]
, [ [ @schedule_uid = ] 'schedule_uid' ]
, [ [ @schedule_name = ] 'schedule_name' ]
, [ [ @logging_level = ] logging_level ]
, [ [ @description = ] 'description' ]
, [ @collection_set_id = ] collection_set_id OUTPUT
, [ [ @collection_set_uid = ] 'collection_set_uid' OUTPUT ]
Argumenty
[ @name = ] 'name'
Is the name of the collection set.name is sysname and cannot be an empty string or NULL.Parametr name musi być unikatowy.Aby uzyskać listę bieżących nazw zestawów kolekcji, należy skierować kwerendę do widoku systemowego syscollector_collection_sets.
[ @target = ] 'target'
Reserved for future use.name is nvarchar(128) with a default value of NULL.[ @collection\_mode = ] collection_mode
Specifies the manner in which the data is collected and stored.collection_mode is smallint and can have one of the following values:0 - Tryb buforowany.Dane kolekcja i przekazywanie znajdują się na osobne harmonogramy.Określ tryb buforowany ciągłego kolekcja.
1 Tryb nie buforowane.Dane kolekcja i przekazywanie jest na tym samym harmonogramie.Określ tryb ad hoc kolekcja lub w kolekcja migawka nie są buforowane.
Wartość domyślna collection_mode wynosi 0. Kiedy collection_mode jest równa 0, schedule_uid lub schedule_name musi być określona.
[ @days\_until\_expiration = ] days_until_expiration
Is the number of days that the collected data is saved in the management data warehouse.days_until_expiration is smallint with a default value of 730 (two years).days_until_expiration must be 0 or a positive integer.[ @proxy\_id = ] proxy_id
Unikatowy identyfikator konta serwera proxy usługi SQL Server Agent.Parametr proxy_id jest typu int, a jego wartość domyślna to NULL.Jeśli parametr proxy_name jest określony, musi mieć wartość NULL.Aby uzyskać wartość parametru proxy_id, należy skierować kwerendę do tabeli systemowej sysproxies.Stała rola dc_admin bazy danych musi mieć uprawnienie dostępu do serwera proxy.Aby uzyskać więcej informacji, zobacz Creating SQL Server Agent Proxies.[ @proxy\_name = ] 'proxy_name'
Is the name of the proxy account.proxy_name is sysname with a default value of NULL.Jeśli określono, proxy_id musi mieć wartość NULL. Jest on do aplikacji do generowania i przypisywania proxy_name wartości w taki sposób, że żądaną relację między wierszami są odzwierciedlane w wartości.[ @schedule\_uid = ] 'schedule_uid'
Is the GUID that points to a schedule.schedule_uid is uniqueidentifier with a default value of NULL.Jeśli określono, schedule_name musi mieć wartość NULL. Aby uzyskać schedule_uid, tabela systemowa sysschedules kwerendy.Kiedy collection_mode jest zestaw na 0, schedule_uid lub schedule_name musi być określona. Kiedy collection_mode jest zestaw na 1, schedule_uid lub schedule_name jest ignorowana, jeśli określony.
[ @schedule\_name = ] 'schedule_name'
Is the name of the schedule.schedule_name is sysname with a default value of NULL.Jeśli określono, schedule_uid musi mieć wartość NULL. Aby uzyskać schedule_name, tabela systemowa sysschedules kwerendy.[ @logging\_level = ] logging_level
Is the logging level.logging_level is smallint with one of the following values:0 - wykonanie informacje i SSIS zdarzenia śledzenia:
Zestawy uruchamiania/zatrzymywania kolekcja
Pakiety uruchamiania/zatrzymywania
Informacje o błędach
To jest zaokrąglana w górę do 40 bitów lub 5 bajtów dla magazynu.
Wykonanie statystyk
Stale uruchomiony postęp pobierania
Zdarzenia ostrzegawcze SSIS
Wynikiem porównania jest w porządku pierwsze głębokość SSIS
Wartość domyślna logging_level wynosi 1.
[ @description = ] 'description'
Is the description of the collection set.description is nvarchar(4000) with a default value of NULL.[ @collection\_set\_id = ] collection_set_id
Is the unique local identifier for the collection set.collection_set_id is int with OUTPUT and is required.[ @collection\_set\_uid = ] 'collection_set_uid'
Is the GUID for the collection set.collection_set_uid is uniqueidentifier with OUTPUT with a default value of NULL.
Wartości kodów powrotnych
0 (sukces) lub 1 (brak)
Remarks
sp_syscollector_create_collection_set musi być uruchamiane w kontekście systemu bazy danych msdb.
Uprawnienia
Wymaga członkostwo w stała rola bazy danych dc_admin (z uprawnienie wykonać) do wykonać tej procedury.
Przykłady
A.Pomoc techniczna dla dowolnego wstawienia i usunięcia
The following example creates a collection set by specifying only the required parameters.@collection\_mode is not required, but the default collection mode (cached) requires specifying either a schedule ID or schedule name.
USE msdb;
GO
DECLARE @collection_set_id int;
EXECUTE dbo.sp_syscollector_create_collection_set
@name = N'Simple collection set test 1',
@description = N'This is a test collection set that runs in non-cached mode.',
@collection_mode = 1,
@collection_set_id = @collection_set_id OUTPUT;
GO
B.Porównania właściwość jest zachowywana po dowolnej liczby węzłów jest wstawiony lub usunięty z hierarchii.
Większość wstawienia i usunięcia zachować właściwość zwartość.
USE msdb;
GO
DECLARE @collection_set_id int;
DECLARE @collection_set_uid uniqueidentifier;
SET @collection_set_uid = NEWID();
EXEC dbo.sp_syscollector_create_collection_set
@name = N'Simple collection set test 2',
@collection_mode = 0,
@days_until_expiration = 365,
@description = N'This is a test collection set that runs in cached mode.',
@logging_level = 2,
@schedule_name = N'CollectorSchedule_Every_30min',
@collection_set_id = @collection_set_id OUTPUT,
@collection_set_uid = @collection_set_uid OUTPUT;
.gif)