sp_help_notification (Transact-SQL)

Uyarı listesi, belirli bir işleç veya belirli bir uyarının işleçlerin listesi için raporlar.

Topic link iconTransact-SQL sözdizimi kuralları

sp_help_notification
     [ @object_type = ] 'object_type' ,
     [ @name = ] 'name' ,
     [ @enum_type = ] 'enum_type' , 
     [ @notification_method = ] notification_method 
     [ , [ @target_name = ] 'target_name' ] 

Bağımsız değişkenler

  • [ @object_type =] 'object_type'
    The type of information to be returned.object_typeis char(9), with no default.object_type can be ALERTS, which lists the alerts assigned to the supplied operator name*,* or OPERATORS, which lists the operators responsible for the supplied alert name*.*

  • [ @name =] 'name'
    An operator name (if object_type is OPERATORS) or an alert name (if object_type is ALERTS).name is sysname, with no default.

  • [ @enum_type =] 'enum_type'
    The object_typeinformation that is returned.enum_type is ACTUAL in most cases.enum_typeis char(10), with no default, and can be one of these values.

    Değer

    Açıklama

    GERÇEK

    Yalnızca listeler object_types ilişkili name.

    ALL

    Lists all theobject_types including those that are not associated with name.

    HEDEF

    Lists only the object_types matching the supplied target_name, regardless of association withname.

  • [ @notification_method =] notification_method
    A numeric value that determines the notification method columns to return.notification_method is tinyint, and can be one of the following values.

    Değer

    Açıklama

    1

    E-posta adresi: yalnızca döndürür.use_email sütun.

    2

    çağrı cihazı: yalnızca döndürür.use_pager sütun.

    4

    Gereksiz: yalnızca döndürür.use_netsend sütun.

    7

    Tüm: tüm sütunlar döndürür.

  • [ @target_name =] 'target_name'
    An alert name to search for (if object_type is ALERTS) or an operator name to search for (if object_type is OPERATORS).target_name is needed only if enum_type is TARGET.target_name is sysname, with a default of NULL.

Kod Valves dönün.

0 (başarılı) veya 1 (hata)

Sonuç Kümeleri

If object_type olan UYARILAR, sonuç küme tüm uyarıları için belirli bir işleç listeler.

Sütun adı

Veri türü

Açıklama

alert_id

int

Uyarı tanımlayıcı numarası.

alert_name

sysname

Uyarı adı.

use_email

int

E-posta, işleç bildirmek için kullanılır:

1 = Yes

0 = No

use_pager

int

Çağrı cihazı, işleç bildirmek için kullanılır:

1 = Yes

0 = No

use_netsend

int

Ağ açılır pencere işleç bildirmek için kullanılır:

1 = Yes

0 = No

has_email

int

Bu uyarı için gönderilen e-posta bildirimleri sayısı.

has_pager

int

Bu uyarı için gönderilen çağrı cihazı bildirimleri sayısı.

has_netsend

int

Sayısı net send , bu uyarı için gönderilen bildirimler.

If object_type is İŞLEÇLER, sonuç kümesi belirli uyarı tüm işleçler listelenir.

Sütun adı

Veri türü

Açıklama

operator_id

int

işleç kimlik numarası.

operator_name

sysname

işleç adı.

use_email

int

Işleç bildirim göndermek için kullanılan bir e-posta:

1 = Yes

0 = No

use_pager

int

Çağrı cihazı, işleç bildirim göndermek için kullanılır:

1 = Yes

0 = No

use_netsend

int

Açılan ağ işleç bildirmek için kullanılır:

1 = Yes

0 = No

has_email

int

Işletmeni, bir e-posta adresine sahip:

1 = Yes

0 = No

has_pager

int

işleç çağrı cihazı adresi vardır:

1 = Yes

0 = No

has_netsend

int

işleç yapılandırılmış net send bildirim yok.

1 = Yes

0 = No

Remarks

Bu saklı yordam, gelen çalıştırılmalıdır msdb veritabanıdır.

İzinler

Bu saklı yordamı çalıştırmak için , bir kullanıcının üye olması gerekir sysadmin sabit sunucu rolü.

Örnekler

C.Uyarılar için belirli bir işleç listeleniyor.

Aşağıdaki örnek, tüm uyarılar verir işleç François Ajenstat herhangi bir bildirim alır.

USE msdb ;
GO

EXEC dbo.sp_help_notification 
    @object_type = N'ALERTS',
    @name = N'François Ajenstat',
    @enum_type = N'ACTUAL',
    @notification_method = 7 ;
GO

b.Belirli uyarı liste işleçleri

Aşağıdaki örnek bildirim için herhangi bir tür alan tüm işleçler verir Test Alert Uyarı.

USE msdb ;
GO

EXEC sp_help_notification
    @object_type = N'OPERATORS',
    @name = N'Test Alert',
    @enum_type = N'ACTUAL',
    @notification_method = 7 ;
GO