记录到 windows 应用程序事件日志

Logging to windows application event log

嗨,这基本上是我想在 sql 服务器管理工​​作室中做的事情。

每当任何用户试图删除或更新 table 中的数据时,都需要将其记录到 Windows 应用程序事件日志中。

有什么地方可以参考如何做到这一点?我找不到任何东西。

谢谢

完整问题:

由于产品 table 非常重要 table,公司希望跟踪选定的更改 table。每当任何用户试图删除或更新 table 中的数据时,都应该登录到 Windows 应用程序事件日志。但是,没有必要撤消更改,因为它可能是 合法更改。

你应该使用 SQL Server Audit for that. When you create a server audit, specify audit destination to be Windows Application Log. For more information, see CREATE SERVER AUDIT (Transact-SQL)。由于这是一项学校作业,我相信您最好自己尝试写一下。祝你好运!