質問
私はxp_logevent
を使用して、システムイベントログに警告としてメッセージエントリを作成することができるcouldntの正しい解決策はありません
他のヒント
ここ xp_logevent(のTransact-SQL)の上のドキュメントがあります
私は(Windows Server 2003のEnterpriseでSQL Server 2005の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
システムログにメッセージがありました。
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.
所属していません StackOverflow