使用 Service Broker 进行审计跟踪

发布于 2025-01-01 07:09:08 字数 101 浏览 4 评论 0原文

寻找为使用服务代理的数据库创建审计试验的指针。我在网上看到很多关于为所有正在审计的表创建一个审计表的示例。但我正在寻找的是每个基表一个审计表,并使用服务代理来完成此任务。任何指示表示赞赏。

Looking for pointers to create audit trial for a database that uses service broker. I have seen many examples online on creating one audit table for all the tables being audited. But what I am looking for is one audit table per base table and the use of service broker to accomplish this. Any pointers are appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

离笑几人歌 2025-01-08 07:09:08

听起来很奇怪..但您可以尝试:

  • 创建服务代理服务和队列(发送方和接收方)
  • 为从发送方发送到接收方的所有表创建触发器从触发器中插入和删除的表中获取服务行 - 可以使用“For XML”条款。要自动创建触发器,可以使用过程 sp_msForEachTable。
  • 为接收者服务制定激活程序,它对那些与

它相关的 xml 消息进行一些操作。您可以通过使用对话框池来提高性能(此处

Sounds like strange idea.. but what you can try:

  • create service broker services and queues (sender and receiver)
  • create triggers for all tables that sends from sender to receiver service rows from inserted and deleted tables in trigger- can use "For XML" clause. to automate trigger creation can use procedure sp_msForEachTable.
  • make activation procedure for receiver service, that does something with those xml messages

thats about it. you could make better performance by using dialog pool (here)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文