使用 Oracle 10 监视哪个语句更新(以及何时)某个表行

发布于 2024-07-21 07:53:47 字数 179 浏览 4 评论 0原文

我正在使用(必须)设计糟糕的 Oracle(10) DB,我没有管理权限(尽管我可以在我的方案中创建表、触发器等)。

现在我遇到了一个问题:该数据库与多个用户/程序连接。 我必须找出谁更新了某一行、何时以及如果可能的话:使用什么样的语句。 是否可以?

提前致谢!

I'm using (have to) a badly designed Oracle(10) DB, for which I don't have admin rights (although I can create tables, triggers, etc in my scheme).

Now I had run into a problem: this DB connected with several users/programs. I must find out who updates a certain row, when, and if possible: with what kind of statement. Is it possible?

Thanks in advance!

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

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

发布评论

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

评论(2

笑着哭最痛 2024-07-28 07:53:47

如果您拥有启用审核的管理员权限,那么执行此操作会更容易。 如果没有审计能力,您只能使用触发器来处理插入/更新/删除的日志记录。 在您的情况下,由于您只对更新感兴趣,因此您可以在表上放置一个触发器,以便在更新后触发,该触发器将更改的内容、由谁、从何处、到什么日期以及在哪一天记录到另一个表。

It would be easier to do this if you had admin rights to enable auditing. Without the power of auditing you are left with the use of triggers to handle the logging of inserts/updates/delete. In your case since you are interested in only update, you can put a trigger on the table to fire after the update which logs to another table what was changed, by whom, from where and to what and on what day.

地狱即天堂 2024-07-28 07:53:47

我会为您正在使用的表创建一个日记表。 它将向您显示操作类型和 oracle 用户...以及一堆其他数据(如果您需要)。

I would create a journal table for the table you are working with. It will show you the operation type and the oracle user...as well as a bunch of other data if you need it.

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