srv_message_handler (genişletilmiş saklı yordam API)
Important Note: |
|---|
This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. CLR tümleştirme kullanın. |
Yüklü genişletilmiş saklı yordam API iletisinin işleyiciyi çağırır.This function is usually used to call Microsoft SQL Server from an extended stored procedure to log an error (defined by the extended stored procedure) in the SQL Server error log file or the Microsoft Windows application log.
int srv_message_handler (
SRV_PROC *
srvproc
,
int
errornum
,
BYTE
severity
,
BYTE
state
,
int
oserrnum
,
char *
errtext
,
int
errtextlen
,
char *
oserrtext
,
int
oserrtextlen
);
Bağımsız değişkenler
srvproc
Belirli bir istemci bağlantısı için tanıtıcı SRV_PROC yapı işaretçisini belirtilir.The srvproc parameter contains information that is used to manage communication and data between the application and the istemci.errornum
Hata numarasını genişletilmiş saklı yordam tarafından tanımlanan.Bu sayı, 50.001 ile 2.147.483.647 arasında olmalıdır.severity
Standart bir iş SQL Server Hata önem değeri. Bu sayı, 0 ile 24 arasında olmalıdır.state
Iş bir SQL Server hata durum değeri.oserrnum
Işletim sistemi hata sayısıdır.Bu bağımsız değişken yoksayılır.errtext
Genişletilmiş saklı yordam hata tanımı errornum.errtextlen
Genişletilmiş saklı yordam hata dize uzunluğu errtext.oserrtext
Işletim sistemi hata tanımı oserrnum. Bu bağımsız değişken yoksayılır.oserrtextlen
Işletim sistemi hata dize uzunluğu oserrtext.
Verir
BAŞARıLı veya BAŞARıSıZ.
Remarks
The srv_message_handler function enables an extended stored procedure to integrate with the centralized error logging and reporting features of SQL Server.SQL Server alerts can be established for events from extended stored procedures, and SQL Server Agent will monitor for these alert conditions.
Hata iletisinin daha uzunsa, 412 bayta fazlalıkları atılır.
Security Note: |
|---|
Genişletilmiş depolanmış yordamların kaynak kodunu derinlemesine gözden geçirmelisiniz ve derlenmiş DLL'leri bir üretim sunucusuna yüklemeden önce onları sınamalısınız.Bu güvenlik incelemesi ve sınama hakkında daha fazla bilgi için bkz: Microsoft Web sitesini. |
Important Note:
Security Note: