SQL Server 2000中有DDL审计吗
如果没有,有没有办法判断触发器何时被禁用/启用?
后续:
这是一个相当有趣的诊断案例。 我只是从外围参与其中,而进行诊断的人不是数据库人员。
不管怎样,他有一个触发器可以将数据从一个表移动到另一个表。 他做了一个比较,并不是所有的数据都进入了第二个表。 我说过,我是 SQL Server 的批评者,但我相信它们的触发器在同一事务中触发。 他说,但有些数据成功了……如果它只是被禁用,那么什么都不能成功。 真的。 所以我说也许有人正在启用和禁用触发器。 因此就有了这个问题。
但真正发生的事情是有人永久禁用了触发器并将代码复制到设置为在特定时间运行的存储过程中。
正确的取证测试应该是查看第二个表的依赖关系,看看还有什么在使用它。 这将显示肿瘤的过程......(我一直在观看很多 House 重播,可以你告诉)。
And if not, is there a way to tell when a trigger was disabled/enabled?
FOLLOWUP:
It's a rather interesting diagnostic case. I was only involved from the periphery, and the guy doing the diagnostics isn't a database guy.
Anyways, he had a trigger that would move data from one table to another. He did a comparison and not all the data had made it to the second table. I said, I'm a critic of SQL Server but I trust that their triggers fire in the same transaction. He said but some of the data made it... if it was just disabled, nothing should make it. True. So I said maybe someone is enabling and disabling the triggers. Hence the question.
But what really happened is someone permanently disabled the trigger and copied the code into a sproc that was set to run at a certain time.
The correct forensic test would have been to look at the dependencies of the second table, see what else was using it. That would show the tumor sproc... (I've been watching lots of House reruns, can ya tell).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没有审计,尽管有一家名为 Lumigent 的公司提供了一个产品“Audit DB”,该产品将为 SQL Server 进行 DDL 审计(除其他外)。
您可以在 sysobjects 表中查找 crdate,它将告诉您对象的创建时间。
No auditing, though there is a company called Lumigent that offers a product "Audit DB" which will do DDL auditing (among other things) for SQL Server.
You can look in the sysobjects table for the crdate which will tell you when the object was created.
中写的问题非常相似
您的问题看起来与 Randy Volters 在 Simple-Talk http://www.simple-talk.com/sql/database-administration/dml-trigger-status-alerts/
我怀疑它会有所帮助
Your problem looks quite similar to the one that Randy Volters wrote about in Simple-Talk
http://www.simple-talk.com/sql/database-administration/dml-trigger-status-alerts/
I suspect it will help