Pregunta
no pude capaz de hacer una entrada de mensajes de advertencia en el registro de sucesos del sistema mediante xp_logevent
No hay solución correcta
Otros consejos
aquí es la documentación sobre xp_logevent (Transact-SQL)
cuando me encontré con este ejemplo (a partir de la documentación anterior en SQL Server 2005 Enterprise en Windows Server 2003 Enterprise):
--I'm not sure why they declare their local variables with @@, but this code is right from the documentation
DECLARE @@TABNAME varchar(30)
DECLARE @@USERNAME varchar(30)
DECLARE @@MESSAGE varchar(255)
SET @@TABNAME = 'customers'
SET @@USERNAME = USER_NAME()
SELECT @@MESSAGE = 'The table ' + @@TABNAME + ' is not owned by the user
' + @@USERNAME + '.'
USE master
EXEC xp_logevent 60000, @@MESSAGE, informational
había un mensaje en el registro del sistema:
Type: Informational
Source: MSSQLSERVER
Category: (2)
Event: 17061
User: N/A
Description: Error: 60000 Severity: 10 State: 1 The table customers is not owned by the user dbo.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow