sp_syscollector_create_collection_set (Transact-SQL)
Yeni bir koleksiyon oluşturur küme.Bu saklı yordam, bir özel topluluk oluşturmak için kullanabileceğiniz küme veri koleksiyon.
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 ]
Bağımsız değişkenler
[ @name = ] 'name'
Is the name of the collection set.name is sysname and cannot be an empty string or NULL.name benzersiz olması gerekir.Geçerli koleksiyon listesi küme syscollector_collection_kümes sistem Görünüm adları, sorgu.
[ @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 - Önbelleğe alınmış modu'nu tıklatın.Veri koleksiyon ve karşıya yükleme üzerinde ayrı zamanlamalar ' dir.Önbellekli modda sürekli derlemesinin belirtin.
1 Mod önbelleğe alınmamış.Veri koleksiyon ve karşıya yükle aynı zamanlamada olması.Ad hoc koleksiyon veya anlık görüntü koleksiyon önbelleğe alınmamış modunu belirtin.
Varsayılan değeri collection_mode 0'dur. Ne zaman collection_mode 0 ' dır schedule_uid veya schedule_name belirtilmeli.
[ @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
Is the unique identifier for a SQL Server Agent proxy account.proxy_id is int with a default value of NULL.Belirtilmişse, proxy_name NULL olmalıdır. Edinme proxy_id, sysproxies sistem tablosu sorgu. Dc_admin sabit veritabanı rolü, proxy erişim izninizin olması gerekir.Daha fazla bilgi için bkz:SQL Server aracısı proxy oluşturma.[ @proxy\_name = ] 'proxy_name'
Is the name of the proxy account.proxy_name is sysname with a default value of NULL.Belirtilmişse, proxy_id NULL olmalıdır. Edinme proxy_name, sysproxies sistem tablosu sorgu.[ @schedule\_uid = ] 'schedule_uid'
Is the GUID that points to a schedule.schedule_uid is uniqueidentifier with a default value of NULL.Belirtilmişse, schedule_name NULL olmalıdır. Edinme schedule_uid, sysschedules sistem query tablo.Ne zaman collection_mode 0 olarak küme schedule_uid veya schedule_name belirtilmeli. Ne zaman collection_mode 1 olarak küme schedule_uid veya schedule_name Belirtilen yoksayılır.
[ @schedule\_name = ] 'schedule_name'
Is the name of the schedule.schedule_name is sysname with a default value of NULL.Belirtilmişse, schedule_uid NULL olmalıdır. Edinme schedule_name, sysschedules sistem query tablo.[ @logging\_level = ] logging_level
Is the logging level.logging_level is smallint with one of the following values:0 - günlük yürütme bilgileri ve SSIS izleme olayları için:
Başlatma/durdurma koleksiyon kümeleri
Başlatma/durdurma paketler
Hata bilgisi
1 düzey-0 günlüğe kaydetme ve:
Çalıştırma istatistikleri
koleksiyon ilerleme durumunu sürekli olarak çalışan
Uyarı olaylarını SSIS
2 düzey-1 günlük ve ayrıntılı olay bilgilerini SSIS
Varsayılan değeri logging_level 1'dur.
[ @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.
Dönüş Kodu Değerleri
0 (başarılı) veya 1 (hata)
Remarks
sp_syscollector_create_collection_set msdb veritabanını sistem bağlamında çalıştırmalısınız.
İzinler
Bu yordamı çalıştırmak yürütmek izni) ile (dc_admin sabit veritabanı rolü üyeliği gerekir.
Örnekler
C.Bir koleksiyon oluşturma küme varsayılan değerleri kullanarak
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.Bir koleksiyon oluşturma küme belirli değerleri kullanarak
Aşağıdaki örnek, değerleri çoğu için parametreleri ayarlamak için bir koleksiyon oluşturur.
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;