SQL로 이벤트로그를 기록할 수 있다.
배치작업하는 프로시져 등에서 오류가 발생했을 때 유용하다.

다음과 같이 쓴다.

EXEC master..xp_logevent 50001, '메시지입니다.', WARNING

자세한 내용은 아래에...
http://msdn2.microsoft.com/en-us/library/ms186244.aspx


Syntax
xp_logevent { error_number , 'message' } [ , 'severity' ]
error_number

Is a user-defined error number larger than 50,000. The maximum value is 2147483647 (2^31 - 1).

' message '

Is a character string with a maximum of 255 characters.

' severity '

Is one of three character strings: INFORMATIONAL, WARNING, or ERROR. severity is optional, with a default of INFORMATIONAL.

0 (success) or 1 (failure)


Posted by kuaaan
,


사랑합니다. 편안히 잠드소서